Visualiser votre stratégie

Trading financier en R

Ilya Kipnis

Professional Quantitative Analyst and R programmer

La fonction chart.Posn

chart.Posn() offre un bon premier aperçu des performances de la stratégie

chart.Posn(portfolio = portfolio.st, Symbol = "LQD")
Trading financier en R

À quoi cela ressemble

Trading financier en R

Ajouter des indicateurs aux graphiques

Recalculez les indicateurs hors stratégie pour les ajouter au graphique

sma50 <- SMA(x = Cl(LQD), n = 50)
sma200 <- SMA(x = Cl(LQD), n = 200)
dvo <- DVO(HLC = HLC(LQD), nAvg = 2, percentLookback = 126)

Ajoutez les indicateurs avec la commande add_TA(). Utilisez on = 1 pour superposer au cours

chart.Posn(Portfolio = portfolio.st, symbol = "LQD")
add_TA(sma50, on = 1, col = "blue")
add_TA(sma200, on = 1, col = "red")add_TA(dvo)
Trading financier en R

Zoom avant

  • Utilisez zoom_Chart("date1/date2") pour un examen détaillé
  • zoom_Chart("2007-08/2007-12") donne :

Trading financier en R

Passons à la pratique !

Trading financier en R

Preparing Video For Download...