Not logged in
Viewing 15 posts - 1 through 15 (of 51 total)

Forums>StrategyQuant>General Discussion>[How To] Don ´t forget the point value!

  • #113714 |
    Customer
    432 Posts

    I´ve noticed many times that when people post their strategy results here that they are not taking into the account the actual point value SQ allows to set. The point value (a multiple of the tick value) needs to be set correct in relation to your account base currency.

    For example: your account is USD based and you trade the EURUSD. EURUSD is nominated in USD, so any profit / loss coming from it is already in USD by nature and if your account is USD based, the conversion of the profit from this pair to your account base currency would be “1”. However, the fun begins if you start trading the EURAUD on your USD based account. On EURAUD, any profit / loss is given in AUD and that needs to be converted to your account base currency into USD. As of right now this would mean that for your USD based account:

    EURUSD 1 lot, 1 pip movement = 10 USD

    EURAUD 1 lot, 1 pip movement = ~8 USD

    Your broker does this automatically in realtime when you trade and showing your profits, but when you backtest in SQ and create strategies, this is a whole different story and is NOT taken into account if you don´t account for it in SQ in the Data Manager.

    So how do we address this problem in SQ? Via the “Point Value in $” field of each pair in the Data Manager!

    As an example, here is a screenshot of my current setup for USD based accounts, using rates from May 2015:

    Remember that this is for a USD based account. For EUR based accounts, these values are completely different, as for example if EURUSD is being traded on a EUR based account, the profit / loss of that pair that is expressed in USD, needs to be converted to your account base currency EUR.

    Again, your broker does this all in realtime with the current rates, SQ does not, and you need to adjust it steadily (I update the point values once a month) as they are just as fluctuating like any currency pair, since it is nothing else than a steady currency conversion from the currency each pair is nominated in to your account base currency.

    So how do you obtain these point values for your account base currency? It´s easy, go to http://www.xe.com/currencyconverter/#and in the first row you selected the currency the pair you want to trade is denominated in. For EURUSD that = USD. For GBPAUD = AUD. For EURAUD = AUD. For USDCHF = CHF, for GBPCHF = CHF. I think you get the idea. In the second row simply select your account base currency. Now press the “Play” button and you will get the current exchange rate. Multiply that by 100000 and enter it into the “Point Value in $” field in the SQ Data Manager.

    Let´s go through setting up the point value for EURAUD for a USD based trading account:

    1) Go to: http://www.xe.com/currencyconverter/convert/?Amount=1&From=AUD&To=USD

    2) Current rate is

    1.00 AUD = 0.782890 USD

    3) Multiply 0.782890 by 100.000

    4) = 78289 which is the point value you enter for EURAUD in the SQ Data Manager!

    Voila, now your backtests will reflect the reality a lot better. As you see using the correct point value can make a HUGE difference in your backtests as some pairs like EURAUD like in the example above, which is traded on a USD based trading account, has a tick value of just 0.78, which means your backtests that possibly are using a tick value of 1 (or a Point Value of 100.000 in that case) will in reality just have 78% of the values in terms of Net Profit and Drawdown if the corrent point value for your account base currency is used. This is ESPECIALLY important if you create portfolios as the relations between the pairs, Net Profit and total portfolio Drawdown can change a lot if you use the correct point value.

    Good luck:)

    #130495
    Customer
    10 Posts

    Great… what about gold? It should have different logics

    #130497
    Customer
    557 Posts

    Hi Geektrader,

     

    Just so I’ve got this clear.

     

    If you leave the Point value in $ as 100,000 for all the currencies, it means that any figures (profit, drawdown, average trade, etc) will be in the quote currency.

     

    So for example if the strategy is using EUR/AUD, then all the figures are in Aussie dollars. 

     

    I suppose one option is if we can see all the figures in pips (profit, drawdown, average monthly profit etc), then we can compare one strategy against another without having to do what you suggest?

     

    Cheers,

     

    Mike

    #130499
    Customer
    10 Posts

    And also, it’s kind of annoying that you have to update that every month:( 

    #130501
    Customer
    432 Posts

    @mikeyc: yes, you are assuming this absolutely correct. But since your account is just in one base currency, the results will hence be wrong for you. Especially if you create portfolios. Yes, for comparing you´d just have to watch the pip values, but for compiling a portfolio that won´t help a lot as you´d be trading that on one account with one base currency and hence the results of each pair need to be adjusted with the correct point value for your base currency, as this is what you will get trading it live. If you use 100.000 as a point value for EURAUD and hence assume a tick value of 10$ for a 1 pip movement @ 1 lot on that pair but then trade that pair on your USD based account, the tick value will be currently 8$ for a 1 pip movement @ 1 lot, not 10$, hence your backtests are wrong in that case if you haven´t adjusted the point value as described above.

     

    @lemming: you basically have to adjust it every day, even every hour if you want it perfectly correct, but surely this is far from realizeable :) So I at least use approx values and update them once a month.

    #130502
    Customer
    557 Posts

    Well I can see a feature request for SQ4. As long as you have the correct currency pairs data loaded in SQ, it should be possible for SQ to know the required exchange rate for every trade, and hence it should be able to calculate the correct profit almost perfectly.

     

    What do you think?

    #130503
    Customer
    432 Posts

    Damn Forum, won´t let me post a long reply… Sorry, the page you’re looking for can’t be found. You can try one of the links in the menu or in the contents on the bottom.

    #130504
    Customer
    48 Posts

    Guys why dont we just automate it base on instruments.ini or whatever from mt4 or any other platform?

    Also it would be nice to add a solution for a crosstesting same strategy with gold/silver/oil/Forex and SL/TP fixed settings. Thank you.

    #130505
    Customer
    432 Posts
    Btw, an interesting thing to point out in that relation is that MT4 does this automatically when backtesting, based on the account currency you´ve selected in the backtesting properties. It does this by using the current last quotes of the symbols you are using when you last connected to your broker (in case you are running your backtests offline). That´s why your backtests will always look a little different each time in MT4 if for example backtesting a EURAUD strategy on a USD based account – as the tick value (point value) is steadily changing of course. I´ve written an EA to demonstrate this:
     
    https://www.sendspace.com/file/ih9aod (works on 5 or 3 digits data only)
     
    Here I´ve done a EURAUD backtest, selected USD as base currency in the MT4 “Expert Properties”:
     
     
    2015.05.23 18:36:31.252 EURAUD,M1: 35988 tick events (36988 bars, 72922 bar states) processed within 15 ms (total time 2781 ms)
    2015.05.23 18:36:31.247 2015.03.30 00:00  SQ_PointValue EURAUD,M1: 79264
     
    Now EURAUD with EUR as base currency:
     
    2015.05.23 18:37:39.584 EURAUD,M1: 35988 tick events (36988 bars, 72922 bar states) processed within 0 ms (total time 0 ms)
    2015.05.23 18:37:39.578 2015.03.30 00:00  SQ_PointValue EURAUD,M1: 71103
     
    Theoretically SQ could handle it automatically the same way as MT4 does it. Mark would need to add that functionality though. Of course though you need to have all the symbols in your data manager for that to work. E.g. if you trade EURAUD and have a USD based account (SQ would need to let you select it in that case like MT4 does), SQ will also need to have the AUDUSD symbol, as otherwise it can´t figure out how to convert the profits of EURAUD that occur in AUD into USD.  In MT4 that is more simple since any broker has those symbols in the Data Manager for that to work. So indeed, my way of adjusting the point values might be the more “safe” or “easy” way here as not everyone will have every symbol needed for these conversions.
     
    If Mark implements it though, he could actually do it perfectly accurate by not just parsing the latest AUDUSD conversion rate, but parsing it in the resolution of the actual used symbol. E.g., if backtesting EURAUD M1 on a USD based account, SQ could also read AUDUSD history each and every minute for the past to get the historical conversion rates to convert the profits / losses of the EURAUD backtest accurate to USD via the AUDUSD symbol. However, it would slow down backtesting a lot then though and leave room for extra errors, which I´d personally want to avoid and hence would prefer to set it manually via the point value or via only using the latest AUDUSD conversion rate like MT4 does it (which would not cost additional backtesting speed).
    #130509
    Customer
    48 Posts

    Do you think we need such a precission in SQ? Perhaps something in the middle would do?

    #130510
    Customer
    432 Posts

    Using the last rate for conversion would do, like MT4 does it. In general though: more precision is not wrong as I want as stable and especially as realistic as possible systems in relation too live trading, because thats what this is all about – not about looking at backtests and being happy about them :) Not sure about you?

    #130511
    Customer
    10 Posts

    Using the last rate for conversion would do, like MT4 does it. In general though: more precision is not wrong as I want as stable and especially as realistic as possible systems in relation too live trading, because thats what this is all about – not about looking at backtests and being happy about them :) Not sure about you?

     

    Hello geek,

     

    you didn’t answer to my gold question:D

     

    However… shouldn’t swq4 calculate every p&l always on the “at the time” exchange rate? Doesn’t make any sense to me convert to today’s exchange rate somethiong i earned or loss 2 years ago.. 

    #130512
    Customer
    432 Posts

    No idea about gold, I only trade Forex, no time to check that right now too, sorry.

     

    Well, makes even fewer sense to just use 100.000 dollar value for every pair as that is definitely wrong. My approach comes at least close. And you are trading your portfolio from TODAY, right? Not from 2 years ago, except you have a time machine?;) So using todays point values and adjusting them at least one time a month makes more sense going forward live trading a portfolio.

    #130518
    Customer
    48 Posts

    Geektrader is absolutelly right. We choose our winners based on fractions of Sharpe Ratio or Profit Factor value, but those can be a fraction wrong.

    Workaround would be to publish a patch or small executable so we can use our symbols.ini or even an excel spreadsheet to calculate the whole thing. We urgently need a tool to sort the issue out in a complex way.

    Best Regards

    p.s. remember about performance issues when adding this kind od calculation. Perhaps it should be optional.

    #130534
    Customer
    432 Posts

    If Mark would just use the last quote for converting from the quote currency to the account currency there is no performance issue.

Viewing 15 posts - 1 through 15 (of 51 total)

You must be logged in to reply to this topic.