Portfolioanalysetools

Introductie tot portefeuille-analyse in Python

Charlotte Werger

Data Scientist

Professionele portfolioanalysetools

Screenshot van professionele portfolio-managementtool

Introductie tot portefeuille-analyse in Python

Je strategie backtesten

  • Backtesten: voer je strategie uit op historische data en bekijk de prestatie
  • Werkt op historische data ≠ garantie voor toekomstig resultaat -> markten veranderen

Backtestresultaten van portfolio vs. index

Introductie tot portefeuille-analyse in Python

Quantopians pyfolio-tool

$ $

Quantopian-logo

$ $ Pyfolio-logo

1 Github: https://github.com/quantopian/pyfolio
Introductie tot portefeuille-analyse in Python

Prestatie- en risicoanalyse in Pyfolio

# Install the package
!pip install pyfolio
# Import the package
import pyfolio as pf
# Read the data as a pandas series
returns=pd.Series(pd.read_csv('pf_returns.csv')
returns.index=pd.to_datetime(returns.index)
# Create a tear sheet on returns
pf.create_returns_tear_sheet(returns)
# If you have backtest and live data 
pf.create_returns_tear_sheet(returns, live_start_date='2018-03-01')
Introductie tot portefeuille-analyse in Python

Pyfolio-tearsheet

Tabel met rendementen in Pyfolio-tearsheet

Rollende Sharpe-ratio in Pyfolio-tearsheet

Drawdown-grafiek in Pyfolio-tearsheet

Introductie tot portefeuille-analyse in Python

Posities en blootstellingen in Pyfolio

# define our sector mappings
sect_map = {'COST': 'Consumer Goods',
            'INTC': 'Technology', 
            'CERN': 'Healthcare', 
            'GPS': 'Technology',
            'MMM': 'Construction', 
            'DELL': 'Technology', 
            'AMD': 'Technology'}
pf.create_position_tear_sheet(returns, positions, 
                             sector_mappings=sect_map)
Introductie tot portefeuille-analyse in Python

Resultaten exposure-tearsheet

$$

Top 10-posities in Pyfolio-tearsheet

$ $

Sectorallocatie in Pyfolio-tearsheet

Introductie tot portefeuille-analyse in Python

Laten we oefenen!

Introductie tot portefeuille-analyse in Python

Preparing Video For Download...