Using Neural Networks in Trading. - page 5

 

Although I do not deal with neural networks in the market, but personally, I would hazard a guess that ordinary linear normalisation would be better than normalisation by unit variance, as retraining the network on new data should be much better, without changing the gap of potential scatter of new data, which of course cannot be done by bringing the series to a centred one. With such normalisation one has to change literally everything in the network, even the weighting coefficients, i.e. simply retrain the network, rather than improve its weighting coefficients. But that is just a supposition. It needs to be tested.

 
registred >> :

Although I do not deal with neural networks in the market, but personally, I would hazard a guess that ordinary linear normalisation would be better than normalisation by unit variance, as retraining the network on new data should be much better, without changing the gap of potential scatter of new data, which of course cannot be done by bringing the series to a centred one. With such normalisation one has to change literally everything in the network, even the weighting coefficients, i.e. simply retrain the network, rather than improve its weighting coefficients. But that is just a supposition. It needs to be tested.


I have a network that simply retrains every 24 hours. I do not know if this is a plus or minus. But, as long as it funks.

 
Neutron >> :

I need to ask Prival how to get the desired distribution (rectangular) from an arbitrary value in analytical form.

Privalych is probably asleep now, so I'll try to answer for him. I once modeled a normal value based on a uniformly distributed one on [0,1]. At the same time I had to calculate a function inverse of integral Gaussian from a uniformly distributed random variable. So in order to get a uniformly distributed random variable from a normally distributed one, we would have to calculate an integral Gaussian function from the former.

By analogy, in order to get a uniformly distributed value from a randomly distributed one, you should first find out the integral distribution function of the first one and apply it to the next one. I hope I didn't mess up too much.

 

Hi Alexey.

Let's make it slow and clear (especially for me).

So, we have exponentially distributed SV of the form Y=A*exp{-a*X} where X is amplitude of data fed to the NS input. We want to find some magic function f(x), acting on a number of input data X allows to obtain their rectangular distribution in the +/-1 interval. To do this you advise:

1. Find a function that is the inverse of the integral Gaussian. Find the integral: Z=-A/a*exp{-a*X}, now find the inverse of it: X=1/a*ln(-A/a/Z)

Is this the desired f(x)=1/a*ln(-A/a/x)?

 
sol писал(а) >>

My network simply retrains every 24 hours. I don't know if that's a plus or a minus. But, so far it's funky.

I take it it's not in the MQL ?

 
FION писал(а) >>

I take it not in MQL ?

I have the grid retrained every time I exit the market, before going in again.

 
Neutron писал(а) >>

My grid is retrained at every market exit, before a new entry.

What is the structure of the net, how many entries, how long does it take to retrain, on MQL or external software?

 

In MQL, a few dozen lines of code and 9kB volume.

Grid 100/2/1, architecture scaled arbitrarily (including number of hidden layers). Hidden layer/s with hypertangent, output shows Buy/Sell (sign). Re-learns (re-learns) in about 100ms.

As hard as I tried, incrementing neurons in the hidden layer doesn't give any significant increase in computational power, but makes training much harder. Perhaps these peculiarities are related to the specific task and the result cannot be generalized.

 
Neutron писал(а) >>

In MQL, a few dozen lines of code and 9kB volume.

Grid 100/2/1, architecture scaled arbitrarily (including number of hidden layers). Hidden layer/s with hypertangent, output shows Buy/Sell (sign). Re-learns (re-learns) in about 100ms.

As hard as I tried, incrementing neurons in the hidden layer doesn't give any significant increase in computational power, but makes training much harder. Perhaps these peculiarities are related to the particular task and the result cannot be generalized.

What do you mean by "the architecture scales arbitrarily"? As far as I understand the architecture is a structure of the network. And scaling is the use of some data rationing function. 100 inputs is a bit much. Or is your 100 something else?

 

Neutron писал(а) >>

Let's make it slow and clear (especially for me).

So, we have exponentially distributed SV

OK Sergey, let's take it slowly and sadly. First, let's deal with general theorems. Here's a link. See theorems 24, 25, 26.

Note: Th 24 deals with the density function of the distribution.

But Th 25 does exactly what you need, and it is about the distribution function.

Look also, for fun, at corollary 8 of Th 26. The third corollary formula is exactly what I was talking about when I wanted to get Gaussian from uniform.

And for your exponentially distributed one just needs to get its distribution function (integral) neatly and apply Th 25.

P.S. By the way, the last phrase of Exercise 36 amused me ("(Note: no one gets it that way.)"). And I, fool, that's how I got it (Codabase has a library of statfunctions)...

Reason: