<-- home

Efficient Frontier

I introduced the Efficient Frontier portfolio optimization scheme in a presentation for MATH480 - Special Topics.
The following is the tear sheet generated for the Efficient Frontier implementation on Quantopian.

bt = get_backtest('5ad8e9664a5ac34596df6c29')
bt.create_full_tear_sheet()
100% Time: 0:00:02|###########################################################|
<td colspan=2>2011-01-05</td><td colspan=2>2018-04-18</td><td colspan=2>87</td>
Start date
End date
Total months
Backtest
Annual return 11.0%
Cumulative returns 113.7%
Annual volatility 15.2%
Sharpe ratio 0.76
Calmar ratio 0.65
Stability 0.93
Max drawdown -16.9%
Omega ratio 1.14
Sortino ratio 1.07
Skew -0.41
Kurtosis 2.51
Tail ratio 0.99
Daily value at risk -1.9%
Gross leverage 0.98
Daily turnover 28.2%
Alpha 0.01
Beta 0.79
Worst drawdown periods Net drawdown in % Peak date Valley date Recovery date Duration
0 16.87 2011-02-18 2011-08-10 2011-10-27 180
1 15.97 2015-04-15 2016-01-11 2016-04-27 271
2 13.95 2012-02-24 2012-06-01 2013-01-09 229
3 12.48 2011-10-28 2011-11-23 2012-02-21 83
4 8.30 2016-04-27 2016-06-22 2016-08-15 79

png

/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py:3834: RuntimeWarning: Invalid value encountered in percentile
  RuntimeWarning)
Stress Events mean min max
US downgrade/European Debt Crisis 0.05% -5.14% 2.85%
Fukushima 0.08% -1.57% 1.58%
EZB IR Event 0.00% -1.45% 2.45%
Apr14 0.05% -1.65% 1.41%
Oct14 0.31% -1.59% 2.19%
Fall2015 -0.27% -3.62% 1.72%
Recovery 0.01% -5.14% 4.33%
New Normal 0.06% -4.05% 3.51%

png

Top 10 long positions of all time max
XLB-19654 100.13%
XLE-19655 100.03%
XLU-19660 99.99%
XLF-19656 99.97%
XLY-19662 99.94%
XLP-19659 99.93%
XLV-19661 99.88%
XLI-19657 99.71%
XLK-19658 99.71%
Top 10 short positions of all time max
Top 10 positions of all time max
XLB-19654 100.13%
XLE-19655 100.03%
XLU-19660 99.99%
XLF-19656 99.97%
XLY-19662 99.94%
XLP-19659 99.93%
XLV-19661 99.88%
XLI-19657 99.71%
XLK-19658 99.71%
All positions ever held max
XLB-19654 100.13%
XLE-19655 100.03%
XLU-19660 99.99%
XLF-19656 99.97%
XLY-19662 99.94%
XLP-19659 99.93%
XLV-19661 99.88%
XLI-19657 99.71%
XLK-19658 99.71%

png

png

/usr/local/lib/python2.7/dist-packages/pyfolio/perf_attrib.py:611: UserWarning: This algorithm has relatively high turnover of its positions. As a result, performance attribution might not be fully accurate.

Performance attribution is calculated based on end-of-day holdings and does not account for intraday activity. Algorithms that derive a high percentage of returns from buying and selling within the same day may receive inaccurate performance attribution.

  warnings.warn(warning_msg)

Performance Relative to Common Risk Factors

Summary Statistics
Annualized Specific Return -7.05%
Annualized Common Return 19.26%
Annualized Total Return 11.00%
Specific Sharpe Ratio -1.44
Exposures Summary Average Risk Factor Exposure Annualized Return Cumulative Return
basic_materials 0.08 1.78% 13.69%
consumer_cyclical 0.07 1.83% 14.10%
financial_services 0.10 0.53% 3.93%
real_estate 0.00 0.00% 0.00%
consumer_defensive 0.07 3.55% 28.89%
health_care 0.09 1.36% 10.32%
utilities 0.22 3.95% 32.54%
communication_services 0.00 0.00% 0.00%
energy 0.18 1.84% 14.20%
industrials 0.05 2.39% 18.79%
technology 0.12 0.61% 4.52%
momentum 0.00 0.00% 0.00%
size 0.00 0.00% 0.00%
value 0.00 0.00% 0.00%
short_term_reversal 0.00 0.00% 0.00%
volatility 0.00 0.00% 0.00%

png