last day (15 days later) » 

22:39
0
A: Using neural network trading in stock exchange, part 2

patIn my experience, when the neural network ends up with all zeros at the output, it is likely that the rails are being saturated. That is that the common sigmoid function processing element will only swing to 0 or +1 limits and if the input happens to be far outside of the linear input sensitivity...

Thank you for the answer. All of my inputs are scaled to the range -1 to 1 you mentioned since I'm using the bipolar sigmod which ranges from -1 to 1 ... if this was the case, the neural network would stick to either -1 or 1 but not 0. My inputs are scaled as are the outputs.
pat
pat
I think you mean the tanh function. Could you show a table of some of the training data? Also, what happens if you use the default output (not slope), is the data non-zero? I'm not familiar with the Sierra Charts tool, so there may be something tool specific I might miss.
I was thinking that my problem is maybe probably even more amateurish...I'm using the slope of the linear regression curve as the output which is just a value oscilating around zero as the price rise or goes down. I thought that might have something to do with my issue.
This is the source data, unscaled filedropper.com/es1000ticktrain
And yes, the tanh function. The Sierra Chart is just a charting software, it does have nothing to do with the NN, I probably shouldn't have mentioned the program at all.
pat
pat
Unfortunately, It doesn't help the troubleshooting much with only raw data. It would be more useful to post the transformed training data (with input and target variables specified).
By default output... you mean the price? So the NN would try to predict the future price instead of the slope? Well, I might try that.
pat: OK, I can post the raw training data, just give me a moment.
pat
pat
22:39
Not price, but return as i mentioned. Price is explosive and not a good variable to use for NNs. You want to always train any type of learner with stationary data where possible. You can always transform back to price after. I have a feeling we are cluttering up the thread with conversation; any suggestions on how to limit that would be appreciated.
[filedropper.com/trainingdata](http://www.filedropper.com/trainingdata)

I'm realizing the format is a bit weird though...even lines are inputs, odd lines are the output. Would you rather the comma separated table with the output as the last column? I can do that. I'm really desperate for any help.
I can try using the return....
pat
pat
Hi, I've never used chat... so sorry for the delay, but this is a better idea.
Your data has no labels for input and output.
sorry for that, this is the format of the FANN library though I can quickly code another output
pat
pat
which column is the target variable? The last column?
no...no the format is even more weird. odd lines is the output, even lines is the input
i'm working on something more table-ish
pat
pat
22:48
?
That is odd. I would start by making sure that there is ONLY ONE target variable. Get rid of unnecessary ones.
no, that IS one target variable. It is the linear regression slope. #2 line is the first set of inputs and #3 line is the corresponding computed slope. #4 line is another set of inputs and #5 line is the corresponding computed slope etc.
pat
pat
I'm confused. The table format should be input D={x1,x2,...xj} where x is your input variable columns and Y=Yt the target variable. Forget slope, just use training data that makes sense. Can you get it in this format?
filedropper.com/trainingdata2 .... is this more readable?
pat
pat
Also, your .dat output has data on seperate columns making it hard to process. It would be nice to have each row correpsond to each input/output observation.
And maybe you could limit it to just 500 observations. It's taking a while to download.
that is better. hang on.
Thank you
pat
pat
23:07
still working on processing data, i assume target is col 21. takes a while in R.
I assume you are using weka...I didn't know it has neural network in it.
Would you like to share the knowledge of how are you using weka on processing the data I sent you?
pat
pat
ah.. i just realized why i'm having so many problems. The data has commas instead of decimals! I need to preprocess.
nput18 Input19 Output0
Min. :-1.0000 Min. :-1.0000 Min. :-0.4943881
1st Qu.:-0.3515 1st Qu.:-0.3515 1st Qu.:-0.0344828
Median :-0.2361 Median :-0.2361 Median : 0.0009466
Mean :-0.2410 Mean :-0.2410 Mean : 0.0007731
3rd Qu.:-0.1319 3rd Qu.:-0.1319 3rd Qu.: 0.0355646
Max. : 1.0000 Max. : 1.0000 Max. : 1.0000000
ok input look ok output is a llittle skewed (min,max = -.49 to 1)
23:25
huh. that's strange. That shouldn't be. Output should be definitely from -1 to 1 ... not from -.49 ... I'll remember to check that out.
thank you for your effort
pat
pat
I'm trying to run a quick nn model here in R. If you want to wait.. it's ok, otherwise I'd appreciate a thread vote if you found anything useful.
Well I definitely appreciate your help, I upvoted your answer
though it's 0:30 AM here and I'm starting to nod off...
anyway, what is R ? Something similar to weka?
pat
pat
R is a statistical programming language.
Last thing I'll pint out is that I trained a nnet in R and also got zero
so hope that adds to your confidence-)
what I'm seeing is the output data is strongly bunched up betwee +/-.03
I'd consider to expand it by scaling to +/-1
see if that dynamic range increase helps any
Good Luck
It should be already scaled....well....but it gave me an idea. thank you
pat
pat
You could also just force the output to +/-1 levels by using an ifelse threshold.

last day (15 days later) »