Hello Folks,
I hope you can help, I am just an amateur trader, so forgive me for the dumb questions...
I would like to build a strategy to buy/sell treasuries and backtest it. Questions:
1) among the many Python frameworks (Zipline, Qstrader, Backtrader, etc), is there anything that has already libraries/code written for fixed income securities?
2) Data... any good source for historical data for government bonds? Ideally not just US securities, but also other countries. I would love especially historical data on the yield curves.
3) Basic math question... given that the only historical data easily accessible is the 10Y yield, I can start backtesting the strategy with that. So let's say in the backtest my trade gets in when the 10Y yield was at 5% and exits when it was at 2%. Treating it as a zero coupon, is the gain the Present Value of the bond calculated with 5% yield and 10Y TTM minus PV at 2% and 10Y TTM, or am I missing something?
thank you
I hope you can help, I am just an amateur trader, so forgive me for the dumb questions...
I would like to build a strategy to buy/sell treasuries and backtest it. Questions:
1) among the many Python frameworks (Zipline, Qstrader, Backtrader, etc), is there anything that has already libraries/code written for fixed income securities?
2) Data... any good source for historical data for government bonds? Ideally not just US securities, but also other countries. I would love especially historical data on the yield curves.
3) Basic math question... given that the only historical data easily accessible is the 10Y yield, I can start backtesting the strategy with that. So let's say in the backtest my trade gets in when the 10Y yield was at 5% and exits when it was at 2%. Treating it as a zero coupon, is the gain the Present Value of the bond calculated with 5% yield and 10Y TTM minus PV at 2% and 10Y TTM, or am I missing something?
thank you