| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 6542.788% Drawdown 46.700% Expectancy 0 Net Profit 44.398% Sharpe Ratio 2.852 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 4.561 Beta 127.52 Annual Standard Deviation 2.422 Annual Variance 5.865 Information Ratio 2.844 Tracking Error 2.422 Treynor Ratio 0.054 Total Fees $29.50 |
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}");
}
}
}
}