strateva.

Articles

How does a regime portfolio use semivariance?

This notebook uses a hidden Markov model, or HMM, to estimate whether the market is in a low, normal or high volatility regime. One of its inputs is downside semivariance. The code splits SPY's daily variation by the sign of its return and uses the portion associated with flat or down sessions. Original notebook

From regime to weights

Once it estimates the regime, the notebook picks how to allocate the portfolio.

RegimeAllocation rule
Low volatilitySearches for the weights with the highest estimated Sharpe using the available history.
Normal volatilityGroups assets that tend to move together and spreads risk across groups.
High volatilityGives more weight to the defensive assets with lower estimated volatility.

The Docker replay recorded 56 rebalance decisions. The strategy used the low-volatility rule 19 times, the normal rule 28 times and the high-volatility rule 9 times. The log identifies the rule used before the weights were calculated and simulated orders placed at the next open.

The historical result

From February 2014 to December 2018, the portfolio gained 2.91% net versus 18.89% for URTH. Its maximum drawdown was 16.80%, compared with 20.72% for URTH. Prices exclude dividends. The simulation charges 0.10% of traded value and an initial 0.10% for the benchmark.

What the engine measured

The difference from the reference cannot be told apart from zeroWhat the Strateva engine measured on 1,235 daily returns. The bars are what was observed; the vertical stroke on the strategy is the range the central 90% fell in when those same returns were resampled in blocks of 5 sessions (1,000 times). The information ratio measures the lead over URTH per unit of risk: its 95% interval runs from −1.09 to 0.59.

Cumulative return

−50%0%50%100%StrategyURTH2.9%18.9%

Worst drawdown from a peak

0%−10%−20%−30%−40%StrategyURTH−16.8%−20.7%

Ratios, with their 95% interval

−2−101SharpeInformation ratio−0.13−0.26
  • Strategy
  • Reference: URTH
  • Resampling range or 95% interval

Source: technical report of the test, linked below. Prices exclude dividends; the resampling uses the same historical series.

The technical report adds the margin of error to these figures. The Sharpe of the strategy was −0.13, with a 95% interval of −0.90 to 0.73. Against URTH, the average annual difference was −3.54%, with a t-statistic of −0.64: it cannot be told apart from zero.

When the same returns were resampled in blocks, the cumulative return fell between −21.11% and 36.70% in the central 90%, and the worst drawdown between 8.48% and 29.17%. What that resampling measures is explained in Block bootstrap and permutation Monte Carlo.

Test reports

The first page of the executive summary
First page of the executive summary of the test. Header "Draft · unsigned evidence". Conclusion: the difference from the reference cannot be told apart from zero with this data; 95% information ratio interval, −1.09 to 0.59. Cumulative return of 2.91% against 18.89% for URTH. Sharpe of −0.13 and worst drawdown of −16.80%.

How to read this document is explained in the guide to the technical report.

How to read both documents is in the guide to the technical report.

See Strateva's services if you want to check how your portfolio weights are set.

All articlesAll the engine reports

CONTACT

Tell me about your strategy. I will say whether it fits within 48 business hours.

Tell me what you want checked, the asset, the frequency and what you have: rules, a report or code. I will tell you whether it fits and which plan it would be.

What to include in your email

  • Market, instruments and frequency (Spot only).
  • What you want checked, and the period.
  • Language and approximate code size, without pasting the code.
  • What data you have, and whether you need an NDA.

Do not send private code, keys or passwords.

stan@strateva.ai

Reply within 48 h (business days). No private material in the first message. No obligation to commission work.

Who replies

I am Filip Stanciu. I have an MSc in Quantitative Finance from the University of Alcalá, a degree in Finance from the Complutense University of Madrid, and a MiFID II certificate. I have worked in quantitative research for an asset manager, validating stock and ETF strategies. I read and reply to every email myself.

I am not a certification body and I am not a large team. I am one person, and I say so.

Nicolae Filip Stanciu