From theory to practice - page 124

 
Vladimir:

Thank you, I got it. Since the banks you are linking their Cypriot subsidiaries to turned out to be Russian, I would like to clarify:

1. Russian banks are forbidden by Federal Law 39-FZ "On the Securities Market" to operate in this area http://docs.cntd.ru/document/9018809:

Article 4_1. Activities of a forex dealer

1. The activity of a forex dealer shall be deemed to be the activity involving conclusion of transactions with individuals, not being individual entrepreneurs, on their own behalf and at their own expense, not on the basis of organized trading:

...

4. The activity of a forex dealer on conclusion of the contracts specified in Paragraph 1 of this Article is exclusive. A forex dealer may not combine his activity with any other professional activity on the securities market or with any other activity.


2. the fact that Russian banks are associated with forex companies, on the contrary, scares me off. Among just forex companies, an average of 50 a year disappear, according to my estimates. Out of more than two thousand. Now let's look at the Russian banks. Now there are 566 of them(http://www.banki.ru/banks/ratings/), at the beginning of last year there were more than 700. 20% disappeared. The rate of disappearance is characterised by these figures https://www.asv.org.ru/liquidation/

  • In progress (327)
  • Completed (288)

    These numbers give me the creeps. DC's connection to the bank scares me off a lot more than it attracts. Compared to DC, where it comes out to be almost a complete peace of mind - only 3% per year disappear.


  • Banks can be very, very different.

     

    Now I'm writing for the programmers who are as much in love with MQL as they are with their own children and who want to get results faster than I do.

    Before your eyes the algorithm becomes much simpler.

    If we accept data in exponential intervals of time, so that the number of ticks for any currency pair is approximately the same (preferably exactly the same, as if we were working with OPEN), then there's no need to accumulate an archive of ticks and examine its statistical characteristics.

    It is enough for a certain sample volume, at each calculation step, to use the formula for the standard deviation of the process

    S = sqrt(N*mean(|Ask(t)-Ask(t-1)|)), where N is the number of ticks, mean is the average value. Bid can be used instead of Ask.

    To account for non-stationarity use also nonparametric skew and it's done.

     
    СанСаныч Фоменко:

    Banks are oh-so-different.

    That's what worries me. And you don't know in advance how different the chosen bank will turn out to be. Whether it will end up in the 327 that are in the process, or go quickly to the 288 that have already been liquidated.

    Worst of all, even the recommendation to choose the big banks does not justify itself. The biggest Masterbank died a year ago, and Sberbank's debts from its default in the 90s are still being repaid, already to the depositors' grandchildren. The only thing that really works now is the 1.4m insurance. But certainly not for retail forex deposits, it's for bank deposits by individuals.

     

    To make up for the author's amazing modesty about the pictures

    H1 increments, peaks every 24 hours, amazing cyclicality, just like in radio engineering.


     

    And here's another similar picture - the beauty has faded


     

    And there's another one


     

    There are no deals and that's it. It's literally freaking me out...

    I've started looking for the reason for this negativity and I think I'm beginning to understand.

    What I'm about to write is very important.

    1. I analyzed the average historical variance for a non-Markovian process calculated for a huge data archive with some sample size and the variance of a Markovian process with pseudo-states, that isS^2 = N*mean(|Ask(t)-Ask(t-1)|), where N is the number of ticks, mean is the average value. The difference between the two averages is in the quantile of the 95% level of the Chebyshev confidence level. However the variance of the Markov process is more dynamic, sensitive and faster "adapts" to the current state of the market, which is characterized by low volatility after the New Year.

    2. VERY IMPORTANT! When analyzing the above mentioned variance of a Markov process I realized that I should work exclusively and only with pure ticks and their increments. There must be no smoothing and averaging of the input data! Otherwise the varianceS^2 = N*mean(|Ask(t)-Ask(t-1)|)) is calculated incorrectly, the connection with the non-Markovian average historical variance is lost and we do not understand anything.

    Filtration of ticks should be performed either by introducing an exponential time scale or not at all.

    Now I have an error: I not only take data through exponential time intervals, but also take the average value between the current and the previous price values. This is wrong!

    I will not touch anything at the moment - at least, let the archive of ticks continue to be collected, but I will correct it this weekend.

    I won't leave this branch, but I will appear less frequently and only with specific results.

    Well, and in the end (remember, right?) final, ready decision in form of working model will be uploaded here absolutely free of charge for all.

    Sincerely,

    Alexander_K

    PS. I work with tick data from the real ECN account. The broker assures me that this is not only exchange quotes, and the broker simply acts as a "gateway" between the exchange and the trader.

     
    Alexander_K2:

    ... According to the broker, it is nothing more than a stock exchange quotation and the broker simply acts as a "gateway" between the exchange and the trader.


    This is fundamentally untrue - you are being deceived. Forex quotes do not exist by definition, because Forex is an over-the-counter, interbank market. Therefore there cannot be unified quotations. One bank sold currency to another - the deal took place. Every brokerage house (broker) selects liquidity providers according to their taste and concludes contracts with them, if the deals of their clients are sent to the interbank market through these providers. They may not conclude contracts if they do not use them for interbank trading but overlap them in clearing or trade against the client himself. In this case, it simply collects quotes. From the set of these liquidity providers a quotes flow is formed that may be (and in most cases is) subsequently filtered in the brokerage company. Approximately like this.

     
    Alexander Sevastyanov:

    This is fundamentally wrong - you are being cheated. There are, by definition, no stock exchange forex quotations because forex is an over-the-counter, inter-bank market. Therefore there cannot be unified quotations. One bank sold currency to another - the deal took place. Every broker chooses liquidity providers and the quotations flow will be formed depending on the set of these providers. This quotation flow may be (and in most cases is) corrected, filtered in brokerage companies. Approximately like this.


    Then what is the difference between ECN-account and another one? Sorry to digress from the topic - but initial deposit fee at my broker is much higher for ECN-account than for any other. I purposely chose one so that there was no interference in the data flow from the DC...

     
    Alexander_K2:

    What then is the difference between an ECN account and another?


    In terms of technology, a fully automatic, instantaneous and guaranteed execution of customer orders without the involvement of a dealer (human). You will execute your order as fast as possible, at the best possible price and without requotes. The spread is floating and commission is available. In reality you will never know if the price of your order is better or not. In my ECN account 90% of the time my trade orders are executed with negative (against me) slippage. The real advantage of ECN accounts is that they officially and in most cases scalping/pipping is allowed.

    You can google ECN accounts for details, it is well described e.g. here.

    Alexander_K2:

    I chose it because there was no interference in data flow by brokerage companies...


    You can never be sure about it, because there is no reference quote in Forex. Take two ECN accounts at different brokers/clearing houses and make sure the quotes are different. You will not find two identical ECNs for quotes.