| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 31.193% Drawdown 28.400% Expectancy 0 Net Profit 14.408% Sharpe Ratio 0.877 Probabilistic Sharpe Ratio 42.442% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.483 Beta -0.293 Annual Standard Deviation 0.4 Annual Variance 0.16 Information Ratio -0.16 Tracking Error 0.647 Treynor Ratio -1.197 Total Fees $1.63 |
namespace QuantConnect.Algorithm.CSharp
{
public class NadionHorizontalFlange : QCAlgorithm
{
string symbol;
public override void Initialize()
{
SetStartDate(2020, 3, 1); //Set Start Date
SetCash(100000); //Set Strategy Cash
symbol = AddEquity("SPY", Resolution.Daily).Symbol;
}
/// 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.Invested)
{
SetHoldings("SPY", 1);
Debug("Purchased Stock");
var ticker_history = History(symbol, 10, Resolution.Daily);
List<TradeBar> t_list = new List<TradeBar>();
foreach(TradeBar tb in ticker_history) {
t_list.Add(tb);
Log(tb.Time.ToString());
}
Log("0th index: " + t_list[0].Time.ToString());
}
}
}
}