PST Backtest Questions #1422
Replies: 7 comments 12 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The Here the head of config.yaml: #YAML
# start_date: 2000-01-19
use_forecast_weight_estimates: False
use_forecast_div_mult_estimates: False
use_instrument_weight_estimates: False
use_instrument_div_mult_estimates: True
use_forecast_scale_estimates: False
#
# Raw data
#
#
# Trading rules
#
volatility_calculation:
func: "sysquant.estimators.vol.mixed_vol_calc"
days: 35
min_periods: 10
vol_abs_min: 0.0000000001
slow_vol_years: 20
proportion_of_slow_vol: 0.35
backfill: True Here the interesting parts of the volatility_calculation:
func: "sysquant.estimators.vol.mixed_vol_calc"
name_returns_attr_in_rawdata: "daily_returns"
multiplier_to_get_daily_vol: 1.0
days: 35
min_periods: 10
slow_vol_years: 10
proportion_of_slow_vol: 0.3
vol_abs_min: 0.0000000001
#
forecast_scalar: 1.0
#
instruments_with_threshold: []
use_forecast_scale_estimates: False
#
forecast_scalar_estimate:
pool_instruments: True
func: "sysquant.estimators.forecast_scalar.forecast_scalar"
window: 250000
min_periods: 500
backfill: True
#
# capping
forecast_cap: 20.0
#
average_absolute_forecast: 10.0
#
forecast_div_multiplier: 1.0
#
use_forecast_div_mult_estimates: False
#
forecast_correlation_estimate:
pool_instruments: True
func: sysquant.estimators.pooled_correlation.pooled_correlation_estimator
frequency: "W"
date_method: "expanding"
using_exponent: True
ew_lookback: 250
min_periods: 20
cleaning: True
rollyears: 20
floor_at_zero: True
forward_fill_data: True
#
forecast_div_mult_estimate:
func: sysquant.estimators.diversification_multipliers.diversification_multiplier_from_list
# this moving average is in business day space to smooth jumps
ewma_span: 125
dm_max: 2.5
#
use_forecast_weight_estimates: False
#
forecast_cost_estimates:
use_pooled_costs: False
use_pooled_turnover: True
#
# Smooth forecast weights; weights are in business days
forecast_weight_ewma_span: 125
#
# Set this to 0.13 to enforce the speed limit even for fixed weights or
# regardless of what an estimator does
forecast_post_ceiling_cost_SR: 999
#
forecast_weight_estimate:
func: sysquant.optimisation.generic_optimiser.genericOptimiser
pool_gross_returns: True
equalise_gross: False
cost_multiplier: 2.0
apply_cost_weight: False
ceiling_cost_SR: 9999
frequency: "W"
date_method: "expanding"
rollyears: 20
method: handcraft
cleaning: True
equalise_SR: False
ann_target_SR: 0.5
equalise_vols: True
shrinkage_SR: 0.9
shrinkage_corr: 0.5
correlation_estimate:
func: sysquant.estimators.correlation_estimator.correlationEstimator
using_exponent: True
ew_lookback: 50000
min_periods: 10
cleaning: False
floor_at_zero: False
mean_estimate:
func: sysquant.estimators.mean_estimator.meanEstimator
using_exponent: True
ew_lookback: 50000
min_periods: 5
vol_estimate:
func: sysquant.estimators.stdev_estimator.stdevEstimator
using_exponent: True
ew_lookback: 50000
min_periods: 5
#
# Capital correction
#
percentage_vol_target: 25.0
notional_trading_capital: 500000
base_currency: "USD"
# other options are full_compounding and half_compounding, but see syscore.capital.py
capital_multiplier:
func: syscore.capital.fixed_capital
#
# add instrument codes here to make long only at position sizing
long_only_instruments:
- "an_instrument"
- "another_instrument"
# Portfolio creation
#
instrument_div_multiplier: 1.0
#
use_instrument_div_mult_estimates: False
#
instrument_correlation_estimate:
func: sysquant.estimators.correlation_over_time.correlation_over_time_for_returns
frequency: "W"
date_method: "expanding"
using_exponent: True
ew_lookback: 25
min_periods: 20
cleaning: True
rollyears: 20
floor_at_zero: True
forward_fill_price_index: True
#
instrument_div_mult_estimate:
func: sysquant.estimators.diversification_multipliers.diversification_multiplier_from_list
# smooth IDM in daily space
ewma_span: 125
dm_max: 2.5
#
use_instrument_weight_estimates: False
#
# smooth weights they will are in daily space
instrument_weight_ewma_span: 125
#
instrument_weight_estimate:
func: sysquant.optimisation.generic_optimiser.genericOptimiser
method: handcraft
frequency: "W"
equalise_gross: False
cost_multiplier: 1.0
apply_cost_weight: False
date_method: "expanding"
rollyears: 20
cleaning: True
equalise_SR: True
ann_target_SR: 0.5
equalise_vols: True
shrinkage_mean: 1.00
shrinkage_corr: 0.50
monte_runs: 100
correlation_estimate:
func: sysquant.estimators.correlation_estimator.correlationEstimator
using_exponent: True
ew_lookback: 500000
min_periods: 10
floor_at_zero: True
cleaning: False
mean_estimate:
func: sysquant.estimators.mean_estimator.meanEstimator
using_exponent: True
ew_lookback: 50000
min_periods: 5
vol_estimate:
func: sysquant.estimators.stdev_estimator.stdevEstimator
using_exponent: True
ew_lookback: 50000
min_periods: 5
#
# buffering / position inertia
buffer_method: forecast
buffer_size: 0.10
buffer_trade_to_edge: True
# costs and accounting
use_SR_costs: False
vol_normalise_currency_costs: True
multiply_roll_costs_by: 0.5
#
# risk overlay - make these numbers and uncomment
#risk_overlay:
# max_risk_fraction_normal_risk: 99999
# max_risk_fraction_stdev_risk: 99999
# max_risk_limit_sum_abs_risk: 99999
# max_risk_leverage: 99999
#
instrument_returns_correlation:
func: sysquant.estimators.correlation_over_time.correlation_over_time_for_returns
interval_frequency: "W"
frequency: "7D"
date_method: "rolling"
using_exponent: True
ew_lookback: 75
min_periods: 10
cleaning: True
offdiag: 0.0
rollyears: 5
floor_at_zero: False
forward_fill_price_index: True
clip: 0.99
# small system optimisation
small_system:
shadow_cost: 40
cost_multiplier: 1.0
tracking_error_buffer: 0.0125
shrink_instrument_returns_correlation: 0.5
And here the forecast_post_ceiling_cost_SR: 0.13
# Capital correction
#
percentage_vol_target: 25.0
notional_trading_capital: 500000
base_currency: "USD"
duplicate_instruments:
include:
things: 'thing_we_want'
exclude:
things: ['bad_thing', 'Another_thing']
exclude_instrument_lists:
# ignore_instruments are ignored in backtests
# we still collect price data for them in production, do rolls etc
# You can override this by modifying the backtest config .yaml file used in either sim or production
# If you want to ignore because a duplicate market, use duplicate_instruments
# If you want to include in sim data, but not actually trade, use trading_restrictions
#
# BEST FOR INSTRUMENTS THAT LOOK EXPENSIVE, BUT WHERE WE HAVEN'T GOT ACCURATE DATA YET
#
# REVIEW REGULARLY AND CHECK THESE INSTRUMENTS AREN'T BETTER ELSEWHERE...
ignore_instruments:
- 'NIFTY'
- 'USIRS10'
- 'USIRS2ERIS'
- 'USIRS5'
- 'USIRS5ERIS' Tweaking the shadow_cost to 40 improves the DO result slightly, but still there is a significant performance drop in comparison to non-DO(sharpe 1.489): ('min', '-9.073'), Do others experience similar issues with the out-of-the-box settings? |
Beta Was this translation helpful? Give feedback.
-
Can you try with higher capital value e.g $10m? Don't set it too high otherwise the optimisation may take too long. I have a similar drop in sharpe between optimised and non optimised backtests for my customised version of the provided system. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I get similar results with my set-up (i.e drop in sharpe from c 1.45 to 0.95). This is very much in contrast to Rob's results when he published this on his blog. |
Beta Was this translation helpful? Give feedback.
-
From around 2005 onward, the account curve of DO remains flat, and it would be great to identify the reason behind this. I've been exploring ways to analyze the results of the Dynamic Optimization (DO) portfolio, and I've encountered an issue with the methods designed for analyzing the "ideal" portfolio. For example, methods like How do you typically analyze the results of the Dynamic Optimisation portfolio? Are there alternative methods, workarounds, or workflows to evaluate the performance of the DO portfolio effectively? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm relatively new to this project but have spent the last couple of months reading AFTS (and Rob's blog) and bringing up PST. I'm currently trying to get a backtest of the dynamic system with good performance through 2024, but I keep seeing it level off for the last few years despite good overall SR. I'm finding that my results with current forecast and weight estimates perform similarly to Rob's prebaked system which is a year out of date, so it's possible I have it configured wrong. I'm wondering if other people are seeing similar results or have backtests with good SR for the last few years.
I have a few other questions and general comments:
interactive_update_roll_status
daily as well as always runningmonitor.py
to close scripts that have crashed? I might not be using this system exactly as intended.Thanks in advance for any help,
Kyle
Beta Was this translation helpful? Give feedback.
All reactions