Hi Rob,
I'm working on implementing pysystemtrade and I'm stuck on the 'Pointsize' field in instrumentconfig.csv
It responds to the get_value_of_block_price_move() function, which claims to produce "How much is a $1 move worth in value terms?" -- the documentation isn't much more enlightening either.
In your book the closest thing seems to be the block value, which to refers to a 1% move... not a $1 move, which I don't really know how to interpret.
Basically I'd like to know how you get to values such as 100000 for AUDUSD or 100 for Gold. I guess they relate to the block size, but how?
To be fair there is a bit of natural confusion between the terminology in book, and in pysystemtrade.
Let's talk about futures contracts specifically, as they are a bit harder than FX or equities (but not as bad as interest rate swaps and CDS that have variable block values!).
If I check out the contract spec for Gold (
here) it has some useful information:
- Contract size 100 troy ounces
- Min tick $0.10
- Dollar value of one tick $10
I can also see that Gold is currently trading around $1600 per ounce.
So if I buy a single Gold contract, that's like buying 100 troy ounces of gold at $1600 per ounce. That has a
notional exposure (sorry more terminology!) of $160,000.
If the price of Gold falls by 1%, then I will lose 1% of $160,000; i.e. $1600 (in this case this is equal to the price, but that is a coincidence).
That is my definition of the block value: the amount you will win or lose owning one contract if the price moves by 1%. It's equal to the notional exposure of the contract multiplied by 1%.
However what if the price of gold goes from $1600 to $1599? Then the value of what I own will go from $160,000 to $159,900. I will have lost $100.
That is my definition of point size: the amount you will win or lose owning one contract if the price moves by $1 (or one GBP, whatever the contract is priced in).
Notice that the point size is equal to the dollar value of one tick divided by the tick size (10/0.1 = 100). Notice also that the point size is equal to the number of 'thing's represented by the contract (in this case, troy ounces of Gold). These aren't coincidences; they will always be true.
The notional exposure is equal to the price multiplied by the point size, and therefore the block value and point size are related as follows:
block value = 1% * notional exposure = 1% * point size * price
This transformation is implemented by the function systems.positionsizing.get_block_value
Code:
(underlying_price, value_of_price_move
) = self.get_instrument_sizing_data(instrument_code)
block_value = 0.01 * underlying_price * value_of_price_move
block_value.columns = ["bvalue"]
For Gold:
block value = 1% * 100 * price
(Here is the source of the coincidence for Gold: the block value will always equal the price because the point size is $100 which exactly cancels the 1% factor. But for most contracts this won't be the case.)
Hope that clears things up.
The reason for the difference is that many people are more comfortable with percentage based risk rather than $ based risk. Bluntly, I was also trying to make my system sufficiently different from what AHL does to avoid being sued (mathematically they are the same, but appearances matter). However since the point size is a fixed unit, that is what has to appear in a specification file.
GAT