SlideShare a Scribd company logo
1 of 15
Download to read offline
W praktyce,
teoretycznie nie wiem niczego

(a w każdym razie niczego nie mogę
            zakładać)


                        Maciej Janiec
                        voladv.com
                        reakkt.com
                        maciej.janiec@voladv.com
Dwa a może osiem miliardów
           (ale nie zajmujmy się drobnymi $500M...)

●   Q1 – JP Morgan wprowadza nowy model VaR
●   średni poziom „ryzyka” skacze z $60M do
    $130M
●   ogłoszona strata: $2B; możliwa: $8B

    W 1994 r., JP Morgan opublikował
    metodologię VaR oraz udostępnił parametry
    modelu.
Nie widzę przeszkód...
●   niestabilne procesy, generujące niestabilne dane
●   wrażliwe na niewielkie różnice metody statystyczne
●   delikatne modele oparte na wielu upraszczających
    założeniach
●   wolno konwergujące metody numeryczne, dające
    przybliżone wyniki
●   gigantyczna ilość danych i kombinacji
●   niestabilna infrastruktura techniczna rynków
J.P. Morgan: „It will fluctuate”

                                                P = 0.14-0.30




Prawdopodobieństwo zmiany WIG20 o -5% w ciągu 25 sesji, marzec 2012
Statystyczna niestabilność

                                                  min = 0.3%




Stabilność testu ADF w zależności od ilości usuniętych elementów
W dzisiejszym losowaniu...




Model zmienności stochastycznej
Hestona

                                  μ - stopa zwrotu aktywa
                                  θ - zmienność długookresowa
                                  κ - tempo powrotu do θ
                                  ξ - zmienność zmienności
Prawdopodobnie dopasowane




Jakość dopasowania modelu z użyciem simulated annealing oraz differential evolution
Choć w tym przypadku
chyba się udało...




  Źródło: Reuters, Nanex, Bloomberg
A zdążymy z tym w trybie HFT?
●   OPRA
    –   250 Kbps transakcje
    –   50 Mbps zlecenia
    –   5 milionów komunikatów / sekundę
        (GPW UTP = 22k / sek)
●   pair trading
    –   500 aktywów   → 124,750 możliwych par
    –   2000 aktywów → 1,999,000 możliwych par

Ale czy to w ogóle ma sens?
No to chodźmy na skróty
oryginalny wzór Black-Scholes
> BSPut.dividend(S=xSpot,K=xStrike,rf=xRf,q=xDiv,TTM=xTTM,sigma=xSigma)
[1] 71993.11
fOptions
> GBSOption(TypeFlag="p",S=xSpot,X=xStrike,Time=xTTM,r=xDiv,b=xRf,sigma=xSigma)@price
[1] 71863.77
RQuantLib
> EuropeanOption(type="put",underlying=xSpot,strike=xStrike,dividendYield=xDiv,
riskFreeRate=xRf,maturity=xTTM,volatility=xSigma)$value
[1] 71998.46
tymczasem:

●   dopasowanie modelu jest często wrażliwe na niewielkie zmiany parametrów

●   przyjęta metoda kalibracji oraz ilość iteracji wpływa na wynik dopasowania
A mamy w ogóle potrzebne dane?
     zarejestrowano 12 transakcji na 6000 ticków
     (najbardziej „ruchliwa” opcja)




     Fragment wizualizacji książki zleceń L2 dla OW20F2240
To jest tak proste, że aż trudne
Modele Fire & Forget
    ●    współczesna teoria portfela – Markowitz
    ●    wycena opcji – Black-Scholes
    ●    ocena poziomu ryzyka - VaR

Schowana prostota
            Stochastyczne równanie różniczkowe dla procesu Ornstein-Uhlenbeck...


                                ...czyli de facto autoregresja:


Przyczajona złożoność
●       model zależny wyłącznie od jednego aktywa

●       przyszłość można w prosty sposób przewidzieć korzystając wyłącznie
        z danych historycznych ujętych w szeregu czasowym
        – analiza techniczna

●       brak analizy „naprężeń” / krytyczności (np. Log Periodic Power Law)
Bankowa wróżka




          ●   przyszłe stopy zwrotu?
          ●   przyszłe zmienności?
          ●   przyszłe korelacje?
Systematyczne straty?
●   MAN GLG Alpha Select Alternative USD
    2011 -12.0%; 2012 YTD -3.0%
●   AQR Managed Futures
    1YR -9.15%; 2012 YTD -1.46%
●   SuperFund A SFIO PLN
    2011 -20.2%; 2012 YTD +2.8%

    polskie przymiarki:
    Provide Able2, Union Investment, Investors, M10...
Bez wyjścia?
●   nie ma pewników: test → accept / reject

●   rynek ciągle ewoluuje – nie można osiąść na laurach

●   podejście interdyscyplinarne – cały czas szukać nowych podejść, czasami w
    nietypowych miejscach

●   podejście numeryczne (czasami: brute force... → symulacje, Monte Carlo)

●   arbitraż statystyczny / market neutral
    (uwaga na płynność i koncentrację)

●   Keep It Simple Stupid

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Praktyka vs teoria

  • 1. W praktyce, teoretycznie nie wiem niczego (a w każdym razie niczego nie mogę zakładać) Maciej Janiec voladv.com reakkt.com maciej.janiec@voladv.com
  • 2. Dwa a może osiem miliardów (ale nie zajmujmy się drobnymi $500M...) ● Q1 – JP Morgan wprowadza nowy model VaR ● średni poziom „ryzyka” skacze z $60M do $130M ● ogłoszona strata: $2B; możliwa: $8B W 1994 r., JP Morgan opublikował metodologię VaR oraz udostępnił parametry modelu.
  • 3. Nie widzę przeszkód... ● niestabilne procesy, generujące niestabilne dane ● wrażliwe na niewielkie różnice metody statystyczne ● delikatne modele oparte na wielu upraszczających założeniach ● wolno konwergujące metody numeryczne, dające przybliżone wyniki ● gigantyczna ilość danych i kombinacji ● niestabilna infrastruktura techniczna rynków
  • 4. J.P. Morgan: „It will fluctuate” P = 0.14-0.30 Prawdopodobieństwo zmiany WIG20 o -5% w ciągu 25 sesji, marzec 2012
  • 5. Statystyczna niestabilność min = 0.3% Stabilność testu ADF w zależności od ilości usuniętych elementów
  • 6. W dzisiejszym losowaniu... Model zmienności stochastycznej Hestona μ - stopa zwrotu aktywa θ - zmienność długookresowa κ - tempo powrotu do θ ξ - zmienność zmienności
  • 7. Prawdopodobnie dopasowane Jakość dopasowania modelu z użyciem simulated annealing oraz differential evolution
  • 8. Choć w tym przypadku chyba się udało... Źródło: Reuters, Nanex, Bloomberg
  • 9. A zdążymy z tym w trybie HFT? ● OPRA – 250 Kbps transakcje – 50 Mbps zlecenia – 5 milionów komunikatów / sekundę (GPW UTP = 22k / sek) ● pair trading – 500 aktywów → 124,750 możliwych par – 2000 aktywów → 1,999,000 możliwych par Ale czy to w ogóle ma sens?
  • 10. No to chodźmy na skróty oryginalny wzór Black-Scholes > BSPut.dividend(S=xSpot,K=xStrike,rf=xRf,q=xDiv,TTM=xTTM,sigma=xSigma) [1] 71993.11 fOptions > GBSOption(TypeFlag="p",S=xSpot,X=xStrike,Time=xTTM,r=xDiv,b=xRf,sigma=xSigma)@price [1] 71863.77 RQuantLib > EuropeanOption(type="put",underlying=xSpot,strike=xStrike,dividendYield=xDiv, riskFreeRate=xRf,maturity=xTTM,volatility=xSigma)$value [1] 71998.46 tymczasem: ● dopasowanie modelu jest często wrażliwe na niewielkie zmiany parametrów ● przyjęta metoda kalibracji oraz ilość iteracji wpływa na wynik dopasowania
  • 11. A mamy w ogóle potrzebne dane? zarejestrowano 12 transakcji na 6000 ticków (najbardziej „ruchliwa” opcja) Fragment wizualizacji książki zleceń L2 dla OW20F2240
  • 12. To jest tak proste, że aż trudne Modele Fire & Forget ● współczesna teoria portfela – Markowitz ● wycena opcji – Black-Scholes ● ocena poziomu ryzyka - VaR Schowana prostota Stochastyczne równanie różniczkowe dla procesu Ornstein-Uhlenbeck... ...czyli de facto autoregresja: Przyczajona złożoność ● model zależny wyłącznie od jednego aktywa ● przyszłość można w prosty sposób przewidzieć korzystając wyłącznie z danych historycznych ujętych w szeregu czasowym – analiza techniczna ● brak analizy „naprężeń” / krytyczności (np. Log Periodic Power Law)
  • 13. Bankowa wróżka ● przyszłe stopy zwrotu? ● przyszłe zmienności? ● przyszłe korelacje?
  • 14. Systematyczne straty? ● MAN GLG Alpha Select Alternative USD 2011 -12.0%; 2012 YTD -3.0% ● AQR Managed Futures 1YR -9.15%; 2012 YTD -1.46% ● SuperFund A SFIO PLN 2011 -20.2%; 2012 YTD +2.8% polskie przymiarki: Provide Able2, Union Investment, Investors, M10...
  • 15. Bez wyjścia? ● nie ma pewników: test → accept / reject ● rynek ciągle ewoluuje – nie można osiąść na laurach ● podejście interdyscyplinarne – cały czas szukać nowych podejść, czasami w nietypowych miejscach ● podejście numeryczne (czasami: brute force... → symulacje, Monte Carlo) ● arbitraż statystyczny / market neutral (uwaga na płynność i koncentrację) ● Keep It Simple Stupid