Finance charges
Forums › ProRealTime English forum › General trading discussions › Finance charges
- This topic has 6 replies, 3 voices, and was last updated 6 years ago by GraHal.
-
-
06/17/2018 at 2:13 AM #73461
I have seen a few posts on calculating broker fees – but this does not seem to work for me.
What I would like to know is how to calculate finance charges per position over time? I can see on the ‘estimated brokerage fees’ I may be able to work something in here. As I trade only FX and indicies I don’t pay brokerage as they charge a spread but a factor is financing/interest for o/night positions. Any ideas pls?
06/17/2018 at 8:11 AM #73467Overnight fees are only charged or added (if shorting) if the position is open at 2200. They are calculated using inter bank lending rate LIBOR or TOM NEXT rates depending on the market. This info is not available in the PRT platform and changes daily so accurate calculation is impossible.
You can do a guesstimate. You will need to build up a history of overnight fees for a strategy that is holding a level position at 2200 so that you can get an idea of the average overnight fee. I mainly trade the big indices and for a level stake of £1 I find the charges to be a bit over £1 per night per position.
What we cannot do is account for dividends that are added and subtracted depending on whether you are long or short and depending on the amount of correction for dividends needed to an instrument.
As I trade long only on major indices the calculation is much easier. I just deduct 1 or a value a bit over 1 from my total gain for every position held overnight. The dividends should offset some of the overnight fees but if I test with values above 1 then it is a good stress test for the strategy.
It is impossible to be accurate but just stress testing any strategy with something like this is a good idea.
Sometimes a trade is going nowhere and overnight fees can kill a strategy. Sometimes it is just better to close the trade for a loss after a few days. Just yesterday I created a strategy and found that holding for over six days actually made less money despite the fact that the win rate was higher and the gain per trade was higher. Overnight fees just sucked the life out of the trades held for more than six days. You have to be careful that you are not just curve fitting when using time as an exit criteria though. Just one day can miss that huge losing trade that means the difference between a winning strategy and a losing one.
So you just need to write a code that detects if it is 2200 (or end of day if trading daily charts) and adds your chosen amount of fees to a variable. Then deduct this total from your strategy profit and graph the result et voila a guesstimated fees stress test code!
1 user thanked author for this post.
06/17/2018 at 8:43 AM #7346906/17/2018 at 9:10 AM #73471Sounds like another Snippet coming on Vonasi?
I feel like I am handing out a lot of fish these days when maybe I should be handing out fishing rods!
Perhaps someone else can come up with their version of how to do it and post it here for your hoover to suck up? …and hopefully it will be better than my version so that I can get a fish. 🙂
1 user thanked author for this post.
06/17/2018 at 2:15 PM #73486IG’s overnight fee calculations can be found here:
https://www.ig.com/au/learn-to-trade/overnight-funding
For Indices: (add Libor for long and subtract for short)
For Forex and Spot Metals
Libor rates can be found here:
http://www.global-rates.com/interest-rates/libor/libor.aspx
Google for Swap Rate if you want to find the Tom Next rate. I don’t trade Forex so I can’t recommend a link.
So as an example for an index:
A £1 long position on FTSE100 today with a closing price of 7668.9 and todays LIBOR rate for GBP of 0.4728% would be:
(1 x 7668.9) x (((2.5/100) + (0.4728/100))/365) = £0.62
Hopefully my maths is correct!
If we had a database of historical Libor rates then we could possibly turn the calculation into some sort of useful overnight fees code but then we still would not have much accuracy due to dividends.
06/17/2018 at 2:44 PM #73487I thought that I would turn it into an indicator for calculating the overnight fees for the last bar.
12345678910111213DEFParam CalculateonLastBars = 1//PositionSize = 1//BrokerFee = 2.5//Libor = 0.4728LongFee = Round(((PositionSize * close) * (((BrokerFee/100) + (Libor/100))/365))*100)/100ShortFee = Round(((PositionSize * close) * (((BrokerFee/100) - (Libor/100))/365))*100)/100DRAWTEXT("Long Fee #LongFee#",BarIndex, 2 ,SansSerif,Bold,16)coloured(153,153,0)DRAWTEXT("Short Fee #ShortFee#",BarIndex, 1 ,SansSerif,Bold,16)coloured(153,153,0)return 3,0ITF file attached.
1 user thanked author for this post.
06/18/2018 at 10:08 AM #73562Thank You Vonasi, duly hoovered into row 44 on here Snippet Link Library
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on