MATLAB: NARX Neural Network – Adding a constraint

Deep Learning Toolboxforecastingnarxneural netorkpricesspot market

Hi
I'm working with NARX NN and predicting the weighted average ,high and low prices of electricity market based on forecast.
The correlation that I'm with Weighted average is good, however for low and high it isn't which is understandable as it's a spot market price and very speculative.
However, the problem I'm facing is that even in training and testing, the high price does get lower than the weighted average (many times) and even lower than low price a few times, which is practically impossible.
My question is, is there a way to add a numeric constraint of sorts that, for instance, if I use the predicted weighted average as an input for the high price (or low for that matter) it should remain above the weighted average for high or below the weighted average for low.
Any thoughts?

Best Answer

Scale target prices to [ 0 1 ]
Estimate
1. average >=0
2. high - average >=0
3. average - low >= 0
Use 'logsig' to prevent negative outputs.
Hope this helps.
Thank you for formally accepting my answer
Greg