Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
264.443%
Drawdown
2.200%
Expectancy
0
Net Profit
0%
Sharpe Ratio
4.411
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.002
Beta
0.999
Annual Standard Deviation
0.193
Annual Variance
0.037
Information Ratio
1.395
Tracking Error
0
Treynor Ratio
0.851
Total Fees
$3.17
//
//  QCU Hello World Example with F# - Basic Template
//  Create a basic template to load the QC API. 
//

open QuantConnect.Data

type BasicTemplateAlgorithm() = 

    //Reuse all the base class of QCAlgorithm
    inherit QCAlgorithm()
    
        //Implement core methods:
        override this.Initialize() =
            this.SetCash(100000)
            this.SetStartDate(2013, 10, 7)
            this.SetEndDate(2013, 10, 11)
            this.AddEquity("SPY", Resolution.Second) |> ignore

        //TradeBars Data Event
        member this.OnData(bar:TradeBars) = 
            
                if not this.Portfolio.Invested then 
                    this.SetHoldings(this.Symbol("SPY"), 1)
                else 
                    ()