Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
19.941%
Drawdown
2.800%
Expectancy
0
Net Profit
0%
Sharpe Ratio
2.251
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.17
Beta
-0.159
Annual Standard Deviation
0.066
Annual Variance
0.004
Information Ratio
0.129
Tracking Error
0.098
Treynor Ratio
-0.936
Total Fees
$0.00
namespace QuantConnect 
{   
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
        public override void Initialize() 
        { 
            SetStartDate(2017, 1, 1);         
            SetEndDate(DateTime.Now);
            
            SetCash(25000);
            
            AddEquity("SPY", Resolution.Hour);
            AddForex("EURUSD", Resolution.Hour);
        }

        public override void OnData(Slice data) 
        {
        	// slice has lots of useful information
        	TradeBars bars = data.Bars;
        	Splits splits = data.Splits;
        	Dividends dividends = data.Dividends;
        	
        	TradeBar bar;
        	if (bars.ContainsKey("EURUSD")) bar = bars["EURUSD"];
        	
            if (!Portfolio.HoldStock) 
            {
                SetHoldings("EURUSD", 1);
                Debug("Purchased EURUSD on " + Time.ToShortDateString());
            }
        }
    }
}