wh y do people trade
play

Wh y do people trade ? FIN AN C IAL TR AD IN G IN R Il y a Kipnis - PowerPoint PPT Presentation

Wh y do people trade ? FIN AN C IAL TR AD IN G IN R Il y a Kipnis Professional Q u antitati v e Anal y st and R programmer What is trading ? The act of BUYING or SELLING an asset BUYING tangible prod u ct SELLING nancial sec u rit


  1. Wh y do people trade ? FIN AN C IAL TR AD IN G IN R Il y a Kipnis Professional Q u antitati v e Anal y st and R programmer

  2. What is trading ? The act of BUYING or SELLING an asset BUYING → tangible prod u ct SELLING → � nancial sec u rit y Cash → prod u ct → cash ( hopef u ll y making a pro � t !) FINANCIAL TRADING IN R

  3. Wh y do people trade ? To make a pro � t To take on , o � oad , and hedge � nancial risk To protect a compan y from commodit y price mo v ements S y stematic trading : risk / re w ard pa y o � is fa v orable eno u gh to bear the risk 1 2 h � p ://www. cntra v eler . com / h � ps :// q z prod .� les .w ordpress . com FINANCIAL TRADING IN R

  4. T y pes of trading Di v ergence ( or moment u m , trend trading ): The mo v ement of a q u antit y w ill contin u e in its c u rrent direction eg CTA ( commodit y trading ad v isors ) FINANCIAL TRADING IN R

  5. T y pes of trading Con v ergence ( or re v ersion , c y cle trading ): The mo v ement of a q u antit y w ill e v ent u all y re v erse eg Warren B u� e � FINANCIAL TRADING IN R

  6. Let ' s practice ! FIN AN C IAL TR AD IN G IN R

  7. Pitfalls of v ario u s trading s y stems FIN AN C IAL TR AD IN G IN R Il y a Kipnis Professional Q u antitati v e Anal y st and R programmer

  8. Pitfalls in trading s y stem de v elopment Market data is a mi x of fear , greed , and noise of millions “ Past performance is not indicati v e of f u t u re res u lts .” O v er � t on past ( in - sample ) data means bad performance on f u t u re ( o u t - of - sample ) data FINANCIAL TRADING IN R

  9. Ho w to not o v erfit Can ca u se a s y stem to fail in the f u t u re Minimi z e the n u mber of mo v ing objects ! GOOD strateg y BAD strateg y FINANCIAL TRADING IN R

  10. Stabilit y w ith s y stem settings - S y stem sho u ld beha v e similarl y for similar se � ings le v els FINANCIAL TRADING IN R

  11. Stabilit y w ith s y stem settings - S y stem sho u ld beha v e similarl y for similar se � ings le v els FINANCIAL TRADING IN R

  12. H y pothesis testing Perform h y pothesis tests Relationship bet w een an indicator & f u t u re ret u rns ? Signal process to generates o u tperformance ? Most of these are be y ond the scope of the co u rse , b u t keep them in mind FINANCIAL TRADING IN R

  13. Let ' s practice ! FIN AN C IAL TR AD IN G IN R

  14. Getting financial data FIN AN C IAL TR AD IN G IN R Il y a Kipnis Professional Q u antitati v e Anal y st and R programmer

  15. Obtaining data from Yahoo ! E v er y trading s y stem relies on data ( o � en costl y) Yahoo ! Finance has free data Use the getSymbols() command in q u antmod FINANCIAL TRADING IN R

  16. 2 ETFs in this co u rse LQD : getSymbols("LQD", from = "1990-01-01", src = "yahoo", adjusted = TR LQD.Open LQD.High LQD.Low LQD.Close LQD.Volume LQD.Adjust 2002-07-30 101.30 102.00 101.25 101.37 21200 52.168 2002-07-31 101.80 102.25 101.55 101.99 272000 52.487 2002-08-01 102.40 103.10 102.30 102.99 111700 53.002 2002-08-02 102.90 103.30 102.45 103.20 29200 53.110 2002-08-05 103.65 103.65 102.51 102.95 166500 52.982 2002-08-06 102.50 102.65 102.10 102.60 430100 52.801 Sp y: see e x ercises FINANCIAL TRADING IN R

  17. q u antmod f u nctions Op() : Opening da y prices Hi() : Ma x im u m v al u e traded d u ring the da y Lo() : Minim u m v al u e traded d u ring the da y Cl() : Last price that w as traded Vo() : N u mber of trades that da y Ad() : Adj u sted closing price , adj u st for di v idends & splits FINANCIAL TRADING IN R

  18. Plotting financial data Plot data u sing the plot() command plot(Cl(LQD)) FINANCIAL TRADING IN R

  19. Let ' s practice ! FIN AN C IAL TR AD IN G IN R

  20. Adding indicators to financial data FIN AN C IAL TR AD IN G IN R Il y a Kipnis Professional Q u antitati v e Anal y st and R programmer

  21. Trading indicators TTR : toolbo x of classical trading indicators SMA ( Simple Mo v ing A v erage ) Pop u lar for CTA ’ s : 200- da y mo v ing a v erage Displa y s w here prices ha v e been o v er the past 10 months FINANCIAL TRADING IN R

  22. Using SMA () # Compute a simple moving average (SMA) across 200 days sma <- SMA(x = Cl(LQD), n = 200) # Add the SMA line to your plot of LQD closing price plot(Cl(LQD)) lines(sma, col = "red") FINANCIAL TRADING IN R

  23. The trend line FINANCIAL TRADING IN R

  24. Let ' s practice ! FIN AN C IAL TR AD IN G IN R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend