전략 분석하기

R로 배우는 금융 트레이딩

Ilya Kipnis

Professional Quantitative Analyst and R programmer

우리의 전략

  • 매수 시점:
    • 50일 이동평균 > 200일 이동평균
    • 그리고 dvo < 20
  • 매도 시점:
    • 50일 이동평균 < 200일 이동평균
    • 또는 dvo > 80
R로 배우는 금융 트레이딩

전략 실행

전략 적용

applyStrategy(strategy = strategy.st, 
              portfolios = portfolio.st)

포트폴리오 업데이트

updatePortf(portfolio.st)
daterange <- time(getPortfolio(portfolio.st)$summary)[-1]

계정 업데이트

updateAcct(account.st, daterange)
updateEndEq(account.st)
R로 배우는 금융 트레이딩
tStats  <- tradeStats(Portfolios = portfolio.st)
tStats
    Portfolio    Symbol    Num.Txns    Num.Trades    Net.Trading.PL    
LQD  firstStrat    LQD       382          156           25681.09     
     Avg.Trade.PL    Med.Trade.PL    Largest.Winner   Largest.Loser   
LQD   164.6223      363.0143         2981.424        -7012.523          
   Gross.Profits    Gross.Losses   Std.Dev.Trade.PL  Percent.Positive      
LQD   77251.33      -51570.24        1174.442          66.66667           
    Percent.Negative   Profit.Factor   Avg.Win.Trade   Med.Win.Trade  
LQD    32.69231           1.497983        742.8012         624.5683        
    Avg.Losing.Trade  Med.Losing.Trade   Avg.Daily.PL   Med.Daily.PL   
LQD     -1011.181        -660.7456          164.6223       363.0143     
     Std.Dev.Daily.PL  Ann.Sharpe   Max.Drawdown   Profit.To.Max.Draw    
LQD         1174.442        2.225141     -10625.62           2.416903           
    Avg.WinLoss.Ratio    Med.WinLoss.Ratio     Max.Equity   Min.Equity     
LQD         0.7345877            0.9452477      27567.98    -1550.332      
    End.Equity
LQD    25681.09
R로 배우는 금융 트레이딩

트레이딩 시스템의 특성

  • 이동평균/추세 신호 기반 시스템
    • 높은 평균 손익비(1 초과)
    • 낮은 승률(50% 미만)
  • 진동/되돌림 신호 기반 시스템:
    • 높은 승률(50% 초과)
    • 낮은 평균 손익비(1 미만)
R로 배우는 금융 트레이딩

연습해 봅시다!

R로 배우는 금융 트레이딩

Preparing Video For Download...