New answers tagged backtesting
2
If using R is an option: With package PMwR, which I maintain, you could compute a time-series of returns for such a portfolio in one line of code:
## P -- a matrix of prices: each column holds the prices of one asset
## w -- a matrix of target weights: each row holds a portfolio
## t -- a vector of times (i.e. row numbers) at which to rebalance
library(&...
2
QuantRocket supports two backtesters, both of which are designed to support universe sizes in the thousands.
Moonshot is pandas-based and has the scalability you would expect from a pandas-based library. It's a good choice if you already know and love pandas.
Zipline has a design that allows you to dynamically filter thousands of securities each day and ...
1
I know this is an old question, but I encountered this problem too, years ago, and the answer is that you can actually compute confidence intervals for VaR backtesting of overlapping returns.
From what I understand, banks usually derive them with heavy Monte Carlo simulations (so they generate the overlapping returns a large amount of times and look at the ...
3
I ran some quick simulations and the differences don't seem particularly drastic:
The black line above is the cumulative total return (inclusive of dividends) of IEF. The yellow line is the so-called "excess return" index for TY (aka ZN), which is the cumulative return of buying and holding TY contracts. To compute this index, I assume that you ...
0
You need to include the Roll Yield https://www.investopedia.com/terms/r/roll-yield.asp#:~:text=Roll%20yield%20is%20the%20return,premium%20to%20longer%2Ddated%20contracts.
Future contracts are usually rolled 4 times a year. When you do the roll, there is a price difference between contracts, and you need to include that. CBOE has a "Pace of the Roll"...
0
In addition to adding the return for your invested cash you have to roll the futures every quarter buy selling the front month and buying the back month a few days before the delivery cycle starts. You'll need some different contract specific data to do that. That should get you pretty close.
1
IEF as an ETF will also have management costs. Also the duration of IEF is lower since it is holding a basket of 7-10 Yr US Treasuries vs a 10 Yr note future, which is a future on just the 10Yr Note (actually a 10Yr 6% Note). There may be some optionality, such as Cheapest-to-deliver, at play with the future.
Also, you will incur roll risk and costs of the ...
Top 50 recent answers are included
Related Tags
backtesting × 295quant-trading-strategies × 53
programming × 50
equities × 17
var × 16
data × 15
historical-data × 15
options × 13
automated-trading × 13
time-series × 12
strategy × 12
trading × 11
futures × 10
fx × 9
modeling × 9
value-at-risk × 9
portfolio-management × 8
market-data × 8
statistics × 8
algorithmic-trading × 8
machine-learning × 8
volatility × 7
risk-management × 7
portfolio × 7
performance-evaluation × 7