Overall Statistics Total Trades1Average Win0%Average Loss0%Compounding Annual Return193.931%Drawdown16.400%Expectancy0Net Profit0%Sharpe Ratio1.796Loss Rate0%Win Rate0%Profit-Loss Ratio0Alpha0.909Beta1.54Annual Standard Deviation0.564Annual Variance0.318Information Ratio1.719Tracking Error0.55Treynor Ratio0.658Total Fees\$98.43
```namespace QuantConnect
{
/*
*   Basic Template Algorithm
*
*   The underlying QCAlgorithm class has many methods which enable you to use QuantConnect.
*   We have explained some of these here, but the full base class can be found at:
*   https://github.com/QuantConnect/Lean/tree/master/Algorithm
*/
public class BasicTemplateAlgorithm : QCAlgorithm
{
string STOCK = "MACK";
public override void Initialize()
{
// backtest parameters

SetStartDate(2017, 8, 10);
SetEndDate(2017, 9, 15);
SetCash(25000);

Securities[STOCK].SetDataNormalizationMode(DataNormalizationMode.Raw);
}

public override void OnData(Slice data)
{
var bars = data.Bars;
var splits = data.Splits;
var dividends = data.Dividends;

foreach (var d in splits)
{
Log("splits on " + d.Key + " factor " + d.Value.SplitFactor);
}

foreach (var d in dividends)
{
Log("splits on " + d.Key + " factor " + d.Value.Distribution);
}

if (bars.ContainsKey(STOCK))
bar = bars[STOCK];

if (!Portfolio.HoldStock)
{
SetHoldings(STOCK, 1);
}
}
public override void OnEndOfDay()
{
Log("### PORTFOLIO " + Time.ToString() + " ###");
foreach(var p in Portfolio)
{
if (p.Value.Quantity != 0)
Log(p.Key + " * " + p.Value.Quantity.ToString("#.####"));
}
Log("#");

}
}
}```