Don't roll ED contracts on volume, roll by date. Volume shifts back and forth, often on a daily basis.should I be rolling them on volume for the
carry contract or price contract?
D
Don't roll ED contracts on volume, roll by date. Volume shifts back and forth, often on a daily basis.should I be rolling them on volume for the
carry contract or price contract?
D
Hi GAT, thanks for releasing pysystemtrade to the great unwashed. finding it
very educational.
I'm trying to recreate the included data. The file EDOLLAR_price.csv currently
has a last entry of "2016-07-08,98.9725" I understand that we are looking at
around 40 months out on the curve so i would expect the contract to be one of
201906, 201909, 2019012
Looking at Quandl CME data 201906 gives last price on our date of 2016-07-08
201906 98.98. But where does the price actually come from? is it your last
sampled price from IB?
I'm begining to create my own Panama adjusted price series and am using the
included price csv's as reference.
Any tips and pointers for this process? Would it be possible to give the
contracts which forms each of the price series files?
When reconstructing the carry files should I be rolling them on volume for the
carry contract or price contract? This sould be easier to check as I have the
source contracts in the file by construction.
Kind regards,
D
Hi GAT, Why do the returns and metrics in pysystemtrade change so markedly if you change the base currency? Shouldn't the returns be similar for various currencies given they are mostly USD instruments and most of the account stays in cash? The vol is often much lower than target vol when using non-USD currency balances. How do you grapple with this?
The carry data file gives the current contracts being used for prices
I'm hoping to publish an extension to pysysystemtrade that creates this data, after pulling individual contracts from quandl, plus explanatory blogpost.
GAT
system.accounts.portfolio(roundpositions=False,delayfill=False)
>>> system.data.daily_prices("GBP").tail(10)
Loading csv data for GBP
2017-01-05 1.2427
2017-01-06 1.2293
2017-01-09 1.2178
2017-01-10 1.2179
2017-01-11 1.2223
2017-01-12 1.2178
2017-01-13 1.2200
2017-01-16 NaN <-------- Holiday
2017-01-17 1.2411
2017-01-18 1.2352
>>> system.accounts.get_notional_position("GBP").tail(10)
2017-01-05 -84.629566
2017-01-06 -77.148345
2017-01-09 -75.307283
2017-01-10 -78.993038
2017-01-11 -81.460877
2017-01-12 -85.617533
2017-01-13 -88.694337
2017-01-16 -88.694339
2017-01-17 -86.485507
2017-01-18 -88.339476
>>> system.accounts.pandl_for_instrument("GBP").tail(10)
2017-01-05 -7555.350031
2017-01-06 10596.153621
2017-01-09 8760.748599
2017-01-10 -72.328423
2017-01-11 -2942.568750
2017-01-12 3170.171272
2017-01-13 -1588.764330
2017-01-16 0.000000
2017-01-17 0.000000 <-------- not supposed to be zero
2017-01-18 4656.453583
Hi GAT,
I notice a bug(?) in pysystemtrade.
Code:system.accounts.portfolio(roundpositions=False,delayfill=False) >>> system.data.daily_prices("GBP").tail(10) Loading csv data for GBP 2017-01-05 1.2427 2017-01-06 1.2293 2017-01-09 1.2178 2017-01-10 1.2179 2017-01-11 1.2223 2017-01-12 1.2178 2017-01-13 1.2200 2017-01-16 NaN <-------- Holiday 2017-01-17 1.2411 2017-01-18 1.2352 >>> system.accounts.get_notional_position("GBP").tail(10) 2017-01-05 -84.629566 2017-01-06 -77.148345 2017-01-09 -75.307283 2017-01-10 -78.993038 2017-01-11 -81.460877 2017-01-12 -85.617533 2017-01-13 -88.694337 2017-01-16 -88.694339 2017-01-17 -86.485507 2017-01-18 -88.339476 >>> system.accounts.pandl_for_instrument("GBP").tail(10) 2017-01-05 -7555.350031 2017-01-06 10596.153621 2017-01-09 8760.748599 2017-01-10 -72.328423 2017-01-11 -2942.568750 2017-01-12 3170.171272 2017-01-13 -1588.764330 2017-01-16 0.000000 2017-01-17 0.000000 <-------- not supposed to be zero 2017-01-18 4656.453583
The carry data file gives the current contracts being used for prices
The final row (#8646) has a price contract of 201909 and a price of 98.1175. The carry contract is 201906.
Then in the price file there is the same price (at the end of these files the current adjusted price will always ). That price will be the closing price from IB on that day, which should be the same as quandl although obviously no guarantee.
GAT
Thanks for the reply (in Jan), I'm starting with recreating the carry data as this seems simpler.
If I remember correctly, you said that you are not rolling with fixed rules, that there is some discretion applied as to when contracts are rolled.
Does this mean that the carry data files provided in pysystemtrade show the
dates of when each of your active instruments were rolled? Meaning you are recording the date when the roll is initiated for use in constructing backtest data.
For data which is outside of the date range your system has been live and rolling, how did you come up with the roll dates? Are these roll dates volume based or bid ask spread based?
Regarding this reply:
..,
Do the change in carry pair dates indicate points in the price file where panama adjustment is applied?
Hi GAT,
I was wondering if there is a feature in pysystemtrade to be able to conduct portfolio attributions?
Also, have you ever experimented with 'value' rules in futures markets?
Thanks!