| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 1973406731453340.0% Drawdown 46.200% Expectancy 0 Net Profit 1359.118% Sharpe Ratio 3.46 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 156.136 Beta -2800.857 Annual Standard Deviation 30.228 Annual Variance 913.759 Information Ratio 3.46 Tracking Error 30.229 Treynor Ratio -0.037 Total Fees $294.25 |
using QuantConnect.Indicators;
namespace QuantConnect
{
public class BasicTemplateAlgorithm : QCAlgorithm
{
string _ticker = "gasl";
private Symbol _symbol;
private Identity _price;
public override void Initialize()
{
SetStartDate(2016, 03, 01);
SetEndDate(2016, 04, 1);
_symbol = AddEquity(_ticker, Resolution.Daily).Symbol;
//_symbol = AddCfd(_ticker, Resolution.Hour, Market.Oanda).Symbol;
_price = Identity(_symbol.Value);
PlotIndicator($"{_symbol.Value} Price", _price);
}
public override void OnData(Slice data)
{
if (!Portfolio.Invested)
{
SetHoldings(_symbol, 1);
Log($"Purchased Security {_symbol}");
}
}
}
}