Discussion of article "Metamodels in machine learning and trading: Original timing of trading orders" - page 12
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
And how can an idex value (0,1,2) compare to a calendar date?
They are not compared, just the time column must be set to index, and 0,1,2 is not needed at all
try the highlighted in your code
def get_prices() -> pd.DataFrame: p = pd.read_csv('files/EURUSD_H1.csv', delim_whitespace=True) pFixed = pd.DataFrame(columns=['time', 'close']) pFixed['time'] = p['<DATE>'] + ' ' + p['<TIME>'] pFixed['time'] = pd.to_datetime(pFixed['time'], format='mixed') pFixed['close'] = p['<CLOSE>'] pFixed.set_index('time', inplace=True) pFixed.index = pd.to_datetime(pFixed.index, unit='s') pFixed = pFixed.dropna() pFixedC = pFixed.copy() count = 0 for i in PERIODS: pFixed[str(count)] = pFixedC.rolling(i).mean() - pFixedC count += 1 return pFixed.dropna()They are not compared, just the time column must be set to index, and 0,1,2 is not needed at all
try the highlighted in your code
In general, I have wasted a lot of time already. Adaptation for data from a file was not successful.
Apparently, it is easier to rewrite from scratch.
Data disappears somewhere after markup on the second iteration - I don't know if it's some kind of problem with the book.
Basically, yes, there's a zeroing out going on here
I can't understand how I can get a value greater than one after the first iteration?
Accordingly, since I don't, all the values "meta_labels" are zeroed out for me.Basically, yes, there's a zeroing out going on here
I can't understand how I can get a value greater than one after the first iteration?
Accordingly, since I don't get it, all " " values are zeroed out for me.something strange is going on. give me time to concentrate, we'll figure it out later ) or send me a piece of your dataset.
something strange is going on. give me time to focus, we'll figure it out later ) or send me a piece of your dataset
This is a rough draft. I had to solve problems that did not occur to you, namely unbalanced classes leads to errors when dividing into subsamples.
While it counts - you can sleep...
I'll try to upload the sample later.Here's a sample.
Still, I guess I didn't fully understand the markup.
I understand correctly that the meta model classifies examples with class "1", and the second model is already activated only on units of the first one?
I'm just confused by your code - what is classified by the model as a unit is written as a zero. If I understood it correctly of course...
In general, if I have correctly reconstructed the method, the result is as follows.
I added checks in the code - otherwise it crashes with an error - attached.
And I understand that model parsing does not work, because the model code has changed?
I understand correctly that the meta model classifies examples with class "1", and the second model is already activated only on units of the first one?
I'm just confused by your code - what the model classifies as a unit is written as a zero. If I understand it correctly of course...
In general, if I have correctly restored the method, the result is as follows
I added checks in the code - otherwise it fails with an error - attached.
And I understand that model parsing doesn't work because the model code has changed?
Yes, there are changes in the new version of the catbusta, I'll discount the redesigns. A bit away from my computer at the moment, will try to help later
Thanks.
Thank you.