17 using System.Collections.Generic;
25 internal sealed
class CrisisReportElement : ChartReportElement
27 private const string _emptyChart =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABZ8AAAQPCAYAAAB/ZZXyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAf+0lEQVR4nOzYwQkAIBDAMHX/nc8lCoIkE/TdPTOzAAAAAAAgdF4HAAAAAADwH/MZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAOfMZAAAAAICc+QwAAAAAQM58BgAAAAAgZz4DAAAAAJAznwEAAAAAyJnPAAAAAADkzGcAAAAAAHLmMwAAAAAAO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BOPgMAAAAAsJPPAAAAAADs5DMAAAAAADv5DAAAAADATj4DAAAAALCTzwAAAAAA7OQzAAAAAAA7+QwAAAAAwE4+AwAAAACwk88AAAAAAOzkMwAAAAAAO/kMAAAAAMBOPgMAAAAAsJPPAAAAAADs5DMAAAAAADv5DAAAAADATj4DAAAAALCTzwAAAAAA7OQzAAAAAAA7+QwAAAAAwE4+AwAAAACwk88AAAAAAOzkMwAAAAAAO/kMAAAAAMBOPgMAAAAAsJPPAAAAAADs5DMAAAAAADv5DAAAAADATj4DAAAAALCTzwAAAAAA7OQzAAAAAAA7+QwAAAAAwE4+AwAAAACwk88AAAAAAOzkMwAAAAAAO/kMAAAAAMBOPgMAAAAAsJPPAAAAAADsAtkSDBqxWCsiAAAAAElFTkSuQmCC";
30 private string _template;
52 public override string Render()
54 var backtestPoints = ResultsUtil.EquityPoints(_backtest);
55 var backtestBenchmarkPoints = ResultsUtil.BenchmarkPoints(_backtest);
57 var backtestSeries =
new Series<DateTime, double>(backtestPoints.Keys, backtestPoints.Values);
58 var backtestBenchmarkSeries =
new Series<DateTime, double>(backtestBenchmarkPoints.Keys, backtestBenchmarkPoints.Values);
60 var html =
new List<string>();
62 foreach (var crisisEvent
in Crisis.Events)
66 var crisis = crisisEvent.Value;
67 var data =
new PyList();
68 var frame = Frame.CreateEmpty<DateTime,
string>();
71 frame[
"Backtest"] = backtestSeries.ResampleEquivalence(date => date.Date, s => s.LastValue());
72 frame[
"Benchmark"] = backtestBenchmarkSeries.ResampleEquivalence(date => date.Date, s => s.LastValue());
74 var crisisFrame = frame.Where(kvp => kvp.Key >= crisis.Start && kvp.Key <= crisis.End);
75 crisisFrame = crisisFrame.Join(
"BacktestPercent", crisisFrame[
"Backtest"].CumulativeReturns());
76 crisisFrame = crisisFrame.Join(
"BenchmarkPercent", crisisFrame[
"Benchmark"].CumulativeReturns());
79 crisisFrame = crisisFrame.FillMissing(
Direction.Forward).FillMissing(0.0);
81 data.Append(crisisFrame.RowKeys.ToList().ToPython());
82 data.Append(crisisFrame[
"BacktestPercent"].Values.ToList().ToPython());
83 data.Append(crisisFrame[
"BenchmarkPercent"].Values.ToList().ToPython());
85 var base64 = (string)Charting.GetCrisisEventsPlots(data, crisis.Name.Replace(
"/",
"").Replace(
".",
"").Replace(
" ",
""));
87 if (base64 == _emptyChart)
92 if (!crisisFrame.IsEmpty)
94 var contents = _template.Replace(ReportKey.CrisisTitle, crisis.ToString(crisisFrame.GetRowKeyAt(0), crisisFrame.GetRowKeyAt(crisisFrame.RowCount - 1)));
95 contents = contents.Replace(ReportKey.CrisisContents, base64);
102 if (Key == ReportKey.CrisisPageStyle)
106 return "display: none;";
112 return string.Join(
"\n", html);