Skip to content

Commit

Permalink
Merge pull request QuantConnect#4294 from QuantConnect/bug-4196-defau…
Browse files Browse the repository at this point in the history
…lt-data-type

SecurityCache default data type
  • Loading branch information
jaredbroad authored Apr 9, 2020
2 parents c8d435d + 6ad123a commit 81e16c6
Show file tree
Hide file tree
Showing 48 changed files with 595 additions and 527 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
Expand Down Expand Up @@ -77,37 +77,43 @@ public override void OnEndOfAlgorithm()
{"Total Trades", "199"},
{"Average Win", "0.00%"},
{"Average Loss", "0.00%"},
{"Compounding Annual Return", "-12.485%"},
{"Compounding Annual Return", "-12.472%"},
{"Drawdown", "0.200%"},
{"Expectancy", "-0.586"},
{"Net Profit", "-0.170%"},
{"Sharpe Ratio", "-9.706"},
{"Sharpe Ratio", "-9.693"},
{"Probabilistic Sharpe Ratio", "12.704%"},
{"Loss Rate", "79%"},
{"Win Rate", "21%"},
{"Profit-Loss Ratio", "0.95"},
{"Alpha", "-0.149"},
{"Beta", "0.037"},
{"Annual Standard Deviation", "0.008"},
{"Annual Variance", "0"},
{"Information Ratio", "-9.473"},
{"Information Ratio", "-9.471"},
{"Tracking Error", "0.212"},
{"Treynor Ratio", "-2.133"},
{"Treynor Ratio", "-2.13"},
{"Total Fees", "$199.00"},
{"Fitness Score", "0.002"},
{"Kelly Criterion Estimate", "38.64"},
{"Kelly Criterion Probability Value", "0.229"},
{"Sortino Ratio", "-21.545"},
{"Return Over Maximum Drawdown", "-77.972"},
{"Portfolio Turnover", "1.135"},
{"Total Insights Generated", "100"},
{"Total Insights Closed", "99"},
{"Total Insights Analysis Completed", "99"},
{"Long Insight Count", "100"},
{"Short Insight Count", "0"},
{"Long/Short Ratio", "100%"},
{"Estimated Monthly Alpha Value", "$123503.2947"},
{"Total Accumulated Estimated Alpha Value", "$19897.7530"},
{"Mean Population Estimated Insight Value", "$200.9874"},
{"Mean Population Direction", "53.5354%"},
{"Mean Population Magnitude", "53.5354%"},
{"Rolling Averaged Population Direction", "59.0771%"},
{"Rolling Averaged Population Magnitude", "59.0771%"},
{"OrderListHash", "-1175325277"}
{"Estimated Monthly Alpha Value", "$126657.6305"},
{"Total Accumulated Estimated Alpha Value", "$20405.9516"},
{"Mean Population Estimated Insight Value", "$206.1207"},
{"Mean Population Direction", "54.5455%"},
{"Mean Population Magnitude", "54.5455%"},
{"Rolling Averaged Population Direction", "59.8056%"},
{"Rolling Averaged Population Magnitude", "59.8056%"},
{"OrderListHash", "1256341962"}
};
}
}
26 changes: 13 additions & 13 deletions Algorithm.CSharp/AddRemoveSecurityRegressionAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,28 @@ public override void OnOrderEvent(OrderEvent orderEvent)
{"Total Trades", "5"},
{"Average Win", "0.47%"},
{"Average Loss", "0%"},
{"Compounding Annual Return", "292.259%"},
{"Compounding Annual Return", "293.067%"},
{"Drawdown", "1.400%"},
{"Expectancy", "0"},
{"Net Profit", "1.763%"},
{"Sharpe Ratio", "12.949"},
{"Probabilistic Sharpe Ratio", "80.016%"},
{"Net Profit", "1.765%"},
{"Sharpe Ratio", "13.11"},
{"Probabilistic Sharpe Ratio", "80.231%"},
{"Loss Rate", "0%"},
{"Win Rate", "100%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "0.685"},
{"Beta", "0.705"},
{"Annual Standard Deviation", "0.158"},
{"Alpha", "0.705"},
{"Beta", "0.7"},
{"Annual Standard Deviation", "0.157"},
{"Annual Variance", "0.025"},
{"Information Ratio", "1.639"},
{"Tracking Error", "0.071"},
{"Treynor Ratio", "2.897"},
{"Total Fees", "$26.40"},
{"Information Ratio", "1.76"},
{"Tracking Error", "0.072"},
{"Treynor Ratio", "2.933"},
{"Total Fees", "$26.39"},
{"Fitness Score", "0.374"},
{"Kelly Criterion Estimate", "0"},
{"Kelly Criterion Probability Value", "0"},
{"Sortino Ratio", "79228162514264337593543950335"},
{"Return Over Maximum Drawdown", "372.831"},
{"Return Over Maximum Drawdown", "373.973"},
{"Portfolio Turnover", "0.374"},
{"Total Insights Generated", "0"},
{"Total Insights Closed", "0"},
Expand All @@ -150,7 +150,7 @@ public override void OnOrderEvent(OrderEvent orderEvent)
{"Mean Population Magnitude", "0%"},
{"Rolling Averaged Population Direction", "0%"},
{"Rolling Averaged Population Magnitude", "0%"},
{"OrderListHash", "-2124644294"}
{"OrderListHash", "1779055144"}
};
}
}
40 changes: 20 additions & 20 deletions Algorithm.CSharp/AddRiskManagementAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,43 +67,43 @@ public override void Initialize()
{"Total Trades", "3"},
{"Average Win", "1.02%"},
{"Average Loss", "0%"},
{"Compounding Annual Return", "287.341%"},
{"Compounding Annual Return", "289.119%"},
{"Drawdown", "2.200%"},
{"Expectancy", "0"},
{"Net Profit", "1.746%"},
{"Sharpe Ratio", "9.12"},
{"Probabilistic Sharpe Ratio", "67.799%"},
{"Net Profit", "1.752%"},
{"Sharpe Ratio", "9.235"},
{"Probabilistic Sharpe Ratio", "68.013%"},
{"Loss Rate", "0%"},
{"Win Rate", "100%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "0.079"},
{"Beta", "1.023"},
{"Annual Standard Deviation", "0.225"},
{"Annual Variance", "0.051"},
{"Information Ratio", "20.828"},
{"Alpha", "0.105"},
{"Beta", "1.022"},
{"Annual Standard Deviation", "0.224"},
{"Annual Variance", "0.05"},
{"Information Ratio", "24.59"},
{"Tracking Error", "0.006"},
{"Treynor Ratio", "2.004"},
{"Treynor Ratio", "2.029"},
{"Total Fees", "$9.77"},
{"Fitness Score", "0.747"},
{"Kelly Criterion Estimate", "38.794"},
{"Kelly Criterion Estimate", "38.64"},
{"Kelly Criterion Probability Value", "0.229"},
{"Sortino Ratio", "79228162514264337593543950335"},
{"Return Over Maximum Drawdown", "107.221"},
{"Return Over Maximum Drawdown", "107.109"},
{"Portfolio Turnover", "0.747"},
{"Total Insights Generated", "100"},
{"Total Insights Closed", "99"},
{"Total Insights Analysis Completed", "99"},
{"Long Insight Count", "100"},
{"Short Insight Count", "0"},
{"Long/Short Ratio", "100%"},
{"Estimated Monthly Alpha Value", "$123503.2947"},
{"Total Accumulated Estimated Alpha Value", "$19897.7530"},
{"Mean Population Estimated Insight Value", "$200.9874"},
{"Mean Population Direction", "53.5354%"},
{"Mean Population Magnitude", "53.5354%"},
{"Rolling Averaged Population Direction", "59.0771%"},
{"Rolling Averaged Population Magnitude", "59.0771%"},
{"OrderListHash", "-1315932053"}
{"Estimated Monthly Alpha Value", "$126657.6305"},
{"Total Accumulated Estimated Alpha Value", "$20405.9516"},
{"Mean Population Estimated Insight Value", "$206.1207"},
{"Mean Population Direction", "54.5455%"},
{"Mean Population Magnitude", "54.5455%"},
{"Rolling Averaged Population Direction", "59.8056%"},
{"Rolling Averaged Population Magnitude", "59.8056%"},
{"OrderListHash", "-887190565"}
};
}
}
20 changes: 10 additions & 10 deletions Algorithm.CSharp/AutomaticIndicatorWarmupRegressionAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,28 @@ protected override decimal ComputeNextValue(IReadOnlyWindow<IndicatorDataPoint>
{"Total Trades", "1"},
{"Average Win", "0%"},
{"Average Loss", "0%"},
{"Compounding Annual Return", "263.153%"},
{"Compounding Annual Return", "264.819%"},
{"Drawdown", "2.200%"},
{"Expectancy", "0"},
{"Net Profit", "1.663%"},
{"Sharpe Ratio", "8.637"},
{"Probabilistic Sharpe Ratio", "67.097%"},
{"Net Profit", "1.668%"},
{"Sharpe Ratio", "8.749"},
{"Probabilistic Sharpe Ratio", "67.311%"},
{"Loss Rate", "0%"},
{"Win Rate", "0%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "-0.029"},
{"Beta", "0.998"},
{"Alpha", "-0.005"},
{"Beta", "0.996"},
{"Annual Standard Deviation", "0.219"},
{"Annual Variance", "0.048"},
{"Information Ratio", "-44.117"},
{"Information Ratio", "-14.189"},
{"Tracking Error", "0.001"},
{"Treynor Ratio", "1.898"},
{"Treynor Ratio", "1.922"},
{"Total Fees", "$3.26"},
{"Fitness Score", "0.248"},
{"Kelly Criterion Estimate", "0"},
{"Kelly Criterion Probability Value", "0"},
{"Sortino Ratio", "79228162514264337593543950335"},
{"Return Over Maximum Drawdown", "93.83"},
{"Return Over Maximum Drawdown", "93.761"},
{"Portfolio Turnover", "0.248"},
{"Total Insights Generated", "0"},
{"Total Insights Closed", "0"},
Expand All @@ -149,7 +149,7 @@ protected override decimal ComputeNextValue(IReadOnlyWindow<IndicatorDataPoint>
{"Mean Population Magnitude", "0%"},
{"Rolling Averaged Population Direction", "0%"},
{"Rolling Averaged Population Magnitude", "0%"},
{"OrderListHash", "1462414266"}
{"OrderListHash", "491919591"}
};
}
}
20 changes: 10 additions & 10 deletions Algorithm.CSharp/BasicTemplateAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,28 @@ public override void OnData(Slice data)
{"Total Trades", "1"},
{"Average Win", "0%"},
{"Average Loss", "0%"},
{"Compounding Annual Return", "263.153%"},
{"Compounding Annual Return", "264.819%"},
{"Drawdown", "2.200%"},
{"Expectancy", "0"},
{"Net Profit", "1.663%"},
{"Sharpe Ratio", "8.637"},
{"Probabilistic Sharpe Ratio", "67.097%"},
{"Net Profit", "1.668%"},
{"Sharpe Ratio", "8.749"},
{"Probabilistic Sharpe Ratio", "67.311%"},
{"Loss Rate", "0%"},
{"Win Rate", "0%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "-0.029"},
{"Beta", "0.998"},
{"Alpha", "-0.005"},
{"Beta", "0.996"},
{"Annual Standard Deviation", "0.219"},
{"Annual Variance", "0.048"},
{"Information Ratio", "-44.117"},
{"Information Ratio", "-14.189"},
{"Tracking Error", "0.001"},
{"Treynor Ratio", "1.898"},
{"Treynor Ratio", "1.922"},
{"Total Fees", "$3.26"},
{"Fitness Score", "0.248"},
{"Kelly Criterion Estimate", "0"},
{"Kelly Criterion Probability Value", "0"},
{"Sortino Ratio", "79228162514264337593543950335"},
{"Return Over Maximum Drawdown", "93.83"},
{"Return Over Maximum Drawdown", "93.761"},
{"Portfolio Turnover", "0.248"},
{"Total Insights Generated", "0"},
{"Total Insights Closed", "0"},
Expand All @@ -116,7 +116,7 @@ public override void OnData(Slice data)
{"Mean Population Magnitude", "0%"},
{"Rolling Averaged Population Direction", "0%"},
{"Rolling Averaged Population Magnitude", "0%"},
{"OrderListHash", "1462414266"}
{"OrderListHash", "491919591"}
};
}
}
38 changes: 19 additions & 19 deletions Algorithm.CSharp/BasicTemplateFrameworkAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,43 +92,43 @@ public override void OnOrderEvent(OrderEvent orderEvent)
{"Total Trades", "3"},
{"Average Win", "0%"},
{"Average Loss", "-1.01%"},
{"Compounding Annual Return", "253.161%"},
{"Compounding Annual Return", "254.782%"},
{"Drawdown", "2.200%"},
{"Expectancy", "-1"},
{"Net Profit", "1.626%"},
{"Sharpe Ratio", "8.263"},
{"Probabilistic Sharpe Ratio", "66.348%"},
{"Net Profit", "1.632%"},
{"Sharpe Ratio", "8.371"},
{"Probabilistic Sharpe Ratio", "66.555%"},
{"Loss Rate", "100%"},
{"Win Rate", "0%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "-0.112"},
{"Beta", "1.008"},
{"Alpha", "-0.088"},
{"Beta", "1.006"},
{"Annual Standard Deviation", "0.221"},
{"Annual Variance", "0.049"},
{"Information Ratio", "-32.419"},
{"Tracking Error", "0.003"},
{"Treynor Ratio", "1.816"},
{"Information Ratio", "-32.586"},
{"Tracking Error", "0.002"},
{"Treynor Ratio", "1.839"},
{"Total Fees", "$9.77"},
{"Fitness Score", "0.747"},
{"Kelly Criterion Estimate", "38.794"},
{"Kelly Criterion Estimate", "38.64"},
{"Kelly Criterion Probability Value", "0.229"},
{"Sortino Ratio", "79228162514264337593543950335"},
{"Return Over Maximum Drawdown", "85.241"},
{"Return Over Maximum Drawdown", "85.209"},
{"Portfolio Turnover", "0.747"},
{"Total Insights Generated", "100"},
{"Total Insights Closed", "99"},
{"Total Insights Analysis Completed", "99"},
{"Long Insight Count", "100"},
{"Short Insight Count", "0"},
{"Long/Short Ratio", "100%"},
{"Estimated Monthly Alpha Value", "$123503.2947"},
{"Total Accumulated Estimated Alpha Value", "$19897.7530"},
{"Mean Population Estimated Insight Value", "$200.9874"},
{"Mean Population Direction", "53.5354%"},
{"Mean Population Magnitude", "53.5354%"},
{"Rolling Averaged Population Direction", "59.0771%"},
{"Rolling Averaged Population Magnitude", "59.0771%"},
{"OrderListHash", "-184856600"}
{"Estimated Monthly Alpha Value", "$126657.6305"},
{"Total Accumulated Estimated Alpha Value", "$20405.9516"},
{"Mean Population Estimated Insight Value", "$206.1207"},
{"Mean Population Direction", "54.5455%"},
{"Mean Population Magnitude", "54.5455%"},
{"Rolling Averaged Population Direction", "59.8056%"},
{"Rolling Averaged Population Magnitude", "59.8056%"},
{"OrderListHash", "951346025"}
};
}
}
2 changes: 1 addition & 1 deletion Algorithm.CSharp/BasicTemplateFuturesAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public override void OnEndOfAlgorithm()
{"Mean Population Magnitude", "0%"},
{"Rolling Averaged Population Direction", "0%"},
{"Rolling Averaged Population Magnitude", "0%"},
{"OrderListHash", "1688092444"}
{"OrderListHash", "-1991522721"}
};
}
}
Loading

0 comments on commit 81e16c6

Please sign in to comment.