| Overall Statistics |
|
Total Trades 2 Average Win 0% Average Loss 0% Compounding Annual Return 7.136% Drawdown 22.200% Expectancy 0 Net Profit 66.001% Sharpe Ratio 0.563 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.182 Beta -5.143 Annual Standard Deviation 0.14 Annual Variance 0.02 Information Ratio 0.42 Tracking Error 0.14 Treynor Ratio -0.015 Total Fees $11.82 |
namespace QuantConnect.Algorithm.CSharp
{
public class CalibratedTransdimensionalRadiator : QCAlgorithm
{
public override void Initialize()
{
//--------------------------
//--- Backtest Paramters ---
//--------------------------
// Set start date for the backtest.
SetStartDate(2012,1,25);
// Set end date for the backtest.
SetEndDate(2019,6,1);
// Set the initial cash for the backtest.
SetCash(100000);
//Add URTH ETF to the portfolio universe.
AddEquity("URTH", Resolution.Minute);
//Add EEM ETF to the portfolio universe.
AddEquity("EEM", Resolution.Minute);
// Schedule rebalancing for URTH.
//Schedule rebalancing for EEM.
}
/// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
/// Slice object keyed by symbol containing the stock data
public override void OnData(Slice data)
{
if (!Portfolio["URTH"].Invested)
{
// There is still no position in the URTH ETF.
// Open a position equal to 70% of the portfolio value.
SetHoldings("URTH", 0.7);
Debug("New position opened for URTH.");
}
if (!Portfolio["EEM"].Invested)
{
// There is still no position in the EEM ETF.
// Open a position equal to 30% of the portfolio value.
SetHoldings("EEM", 0.3);
Debug("New position opened for EEM");
}
// if (!Portfolio.Invested)
// {
// SetHoldings(_spy, 1);
// Debug("Purchased Stock");
//}
}
}
}