Not yet in active use
database.spark[@enable]=true database.spark.sparkmaster=... ../jars #lib/... #conf/spark-defaults.conf
Machine learning is used for classifying/predicting, set machinelearning enable=true to enable this. We are using two engines for this, Spark and Tensorflow. Set machinelearning.sparkml enable=true to use Spark. Set master with machinelearning.sparkml.sparkmaster. Set machinelearning.sparkml.mcp enable=true to use multilayer perceptron classifier, and set machinelearning.sparkml.lr enable=true to use Logistic Regression. Set machinelearning.sparkml.ovr enable=true to enable One-Vs-Rest. To use Tensorflow, set machinelearning.tensorflow enable=true. Here, set machinelearning.tensorflow.dnn enable=true to use the classifier, and machinelearning.tensorflow.l enable=true to use the Logistic regression. To use Spark, see Spark and Docker. To use Tensorflow, see Tensorflow and Docker.
Table 3.1. Machine learning settings
Config setting | Description | Default |
---|---|---|
database... | lots missing | true |
database.maxholes | Max holes/NaN to be filled, or the previous data will be nulled out. | 5 |
machinelearning | true | |
machinelearning.mp | Enable multi-threading in machinelearning part | false |
machinelearning.mp.cpu | The number of multi-processes, number is total CPU count (with hyperthreading) * cpu. | 0.5 (but gives minimum 10 CPUs) |
machinelearning.sparkml | true | |
machinelearning.sparkml.sparkmaster | The spark master | spark://127.0.0.1:7077 |
machinelearning.sparkml.sparknetworktimeout | The spark network timeout | null (to be decided by the spark default) |
machinelearning.sparkml.mcp | Multilayer Perceptron Classifier | true |
machinelearning.sparkml.mcp.config | Multilayer Perceptron Classifier Config | { 'maxiter' : 100, 'layers' : 2, 'tol' : 1.0E-6, 'nn' : [ 1, 1 ] } |
machinelearning.sparkml.lr | Logistic Regression | true |
machinelearning.sparkml.lr.config | Logistic Regression Config | { 'maxiter' : 100, 'tol' : 1.0E-6 } |
machinelearning.sparkml.ovr | One-Vs-Rest | true |
machinelearning.sparkml.ovr.config | One-Vs-Rest Config | { 'maxiter' : 100, 'tol' : 1.0E-6, 'fitintercept' : true } |
machinelearning.tensorflow | true | |
machinelearning.tensorflow.dnn | Deep Neural Network | true |
machinelearning.tensorflow.dnn.config | Deep Neural Network Config | { 'steps' : 2000, 'hiddenlayers' : 3, 'hiddenunits' : [ 10, 20, 10 ] } |
machinelearning.tensorflow.dnnl | Deep Neural Network and Linear combined | false (and not yet enabled/utilized) |
machinelearning.tensorflow.dnnl.config | Deep Neural Network and Linear combined Config | "" |
machinelearning.tensorflow.l | Logistic Regression | true |
machinelearning.tensorflow.l.config | Logistic Regression Config | { 'steps' : 5 } |
machinelearning.tensorflow.l | Logistic Regression | true |
machinelearning.tensorflow.lstm.config | LSTM Config | { 'epochs': 5, 'windowsize': 3, 'horizon': 5 } |
machinelearning.tensorflow.server | Tensorflow Server | http://localhost:8000 |
Table 3.2. Indicator settings
Config setting | Description | Default |
---|---|---|
indicators | Indicator | true |
indicators.move | Simple move indicator | true |
indicators.macd | MACD | true |
indicators.macd.macdhistogramdelta | Use histogram change | true |
indicators.macd.macdhistogramdeltadays | Number of days past for calculating change | 3 |
indicators.macd.macdmomentumdelta | Use momentum change | true |
indicators.macd.macdmomentumdeltadays | Number of days past for calculating change | 3 |
indicators.macd.recommend | Enable MACD recommender | true |
indicators.macd.recommend.buy | ? | "" |
indicators.macd.recommend.buy.weighthistogram | Recommender weight for histogram | 40 |
indicators.macd.recommend.buy.weighthistogramdelta | Recommender weight for histogram delta | 20 |
indicators.macd.recommend.buy.weightmomemtum | Recommender weight for momentum | 20 |
indicators.macd.recommend.buy.weightmomemtumdelta | Recommender weight for momentum delta | 20 |
indicators.macd.recommend.sell | ? | "" |
indicators.macd.recommend.sell.weighthistogram | Recommender weight for histogram | 40 |
indicators.macd.recommend.sell.weighthistogramdelta | Recommender weight for histogram delta | 20 |
indicators.macd.recommend.sell.weightmomemtum | Recommender weight for momentum | 20 |
indicators.macd.recommend.sell.weightmomemtumdelta | Recommender weight for momentum delta | 20 |
indicators.macd.machinelearning | Use MACD machine learning | true |
indicators.macd.machinelearning.momemtumml | Use MACD machine learning for momentum | true |
indicators.macd.machinelearning.histogramml | Use MACD machine learning for histogram | true |
indicators.macd.daysbeforezero | Minimum number of consequecutive days before zero turn | 25 |
indicators.macd.daysafterzero | Number of consequecutive days after zero turn for checking increase/decrease | 10 |
indicators.rsi | Use RSI indicator | true |
indicators.rsi.rsidelta | Use RSI delta | true |
indicators.rsi.rsideltadays | Number of days past for calculating change | 3 |
indicators.stochrsi | StochRSI indicator | false |
indicators.stochrsi.stochrsidelta | Use indicator change | true |
indicators.stochrsi.stochrsideltadays | Number of days past for calculating change | 3 |
indicators.rsi.recommend | Use RSI recommender | true |
indicators.rsi.recommend.buy | ? | "" |
indicators.rsi.recommend.buy.weight | RSI buy weigth | 50 |
indicators.rsi.recommend.buy.weightdelta | RSI delta buy weight | 50 |
indicators.rsi.recommend.sell | ? | "" |
indicators.rsi.recommend.sell.weight | RSI sell weight | 50 |
indicators.rsi.recommend.sell.weightdelta | RSI delta sell weight | 50 |
indicators.cci | CCI indicator | false |
indicators.cci.ccidelta | Use indicator change | true |
indicators.cci.ccideltadays | Number of days past for calculating change | 3 |
indicators.atr | ATR indicator | false |
indicators.atr.atrdelta | Use indicator change | true |
indicators.atr.atrdeltadays | Number of days past for calculating change | 3 |
indicators.stoch | Stoch indicator | false |
indicators.stoch.stochdelta | Use indicator change | true |
indicators.stoch.stochdeltadays | Number of days past for calculating change | 3 |
predictors | Use predictors | true |
predictors.lstm | Use LSTM predictor | 20 |
predictors.lstm.windowsize | Windowsize (sliding) | 3 |
predictors.lstm.horizon | The prediction horizon | 5 |
predictors.lstm.epochs | Epochs (repeats...? explain) | 5 |
misc | ||
misc.percentizepriceindex | Change prices to percentages, starting at 100 | true |
misc.mlstats | Time stats for Machine Learning usage | true |
misc.otherstats | Other stats, like MACD histogram/horizon changing sign | true |
misc.mydays | Number of days to display | 180 |
misc.mytopbottom | Number of items to display in graph | 10 |
misc.mytabledays | Number of table days (explain diff) | 180 |
misc.mytablemoveintervaldays | For move indicator, the days between each move | 5 |
misc.mytableintervaldays | The interval when displaying table graph. | 1 |
misc.myequalize | Enable equalizing (explain...) | true |
misc.mygraphequalize | Enable graph equalizing (explain...) | true |
misc.mygraphequalizeunify | Unified graph equalizing | true |
misc.filterweekend | Filter out collected result on weekend | true |
misc.filterholiday | Filter out collected result on holidays | true (always, not yet implemented) |
evolve.indicatorrecommender.complex.futuredays | Number of future days for doing the classification | 10 |
evolve.indicatorrecommender.complex.intervaldays | Interval between sample days | 5 |
evolve.indicatorrecommender.simple.futuredays | Number of future days for doing the classification | 10 |
evolve.indicatorrecommender.simple.intervaldays | Interval between sample days | 5 |
evolution | Use evolution (fix...) | true |
aggregators | Use aggregations of earlier results | true |
aggregators.indicatorrecommender | Use aggregated recommender | true |
aggregators.indicatorrecommender.simple | Use simple recommender | true |
aggregators.indicatorrecommender.simple.macd | Use simple recommender MACD | true |
aggregators.indicatorrecommender.simple.macd.buy | Use simple recommender MACD buy | |
aggregators.indicatorrecommender.simple.macd.buy.weighthistogram | Simple recommender buy weight for histogram | 40 |
aggregators.indicatorrecommender.simple.macd.buy.weighthistogramdelta | Simple recommender buy weight for histogram delta | 20 |
aggregators.indicatorrecommender.simple.macd.buy.weightmomemtum | Simple recommender buy weight for momentum | 20 |
aggregators.indicatorrecommender.simple.macd.buy.weightmomemtumdelta | Simple recommender buy weight for momentum delta | 20 |
aggregators.indicatorrecommender.simple.macd.sell | Use simple recommender MACD sell | true |
aggregators.indicatorrecommender.simple.macd.sell.weighthistogram | Simple recommender sell weight for histogram | 40 |
aggregators.indicatorrecommender.simple.macd.sell.weighthistogramdelta | Simple recommender sell weight for histogram delta | 20 |
aggregators.indicatorrecommender.simple.macd.sell.weightmomemtum | Simple recommender sell weight for momentum | 20 |
aggregators.indicatorrecommender.simple.macd.sell.weightmomemtumdelta | Simple recommender sell weight for momentum delta | 20 |
aggregators.indicatorrecommender.simple.rsi | Use recommender for simple RSI | true |
aggregators.indicatorrecommender.simple.rsi.buy | Use recommender for simple RSI buy | |
aggregators.indicatorrecommender.simple.rsi.buy.weightrsi | Simple recommender buy weight for RSI | 50 |
aggregators.indicatorrecommender.simple.rsi.buy.weightrsidelta | Simple recommender buy weight for RSI delta | 50 |
aggregators.indicatorrecommender.simple.rsi.sell | Use recommender for simple RSI sell | true |
aggregators.indicatorrecommender.simple.rsi.sell.weightrsi | Simple recommender sell weight for RSI | 50 |
aggregators.indicatorrecommender.simple.rsi.sell.weightrsidelta | Simple recommender buy weight for RSI delta | 50 |
aggregators.indicatorrecommender.complex | Use complex recommender | true |
aggregators.indicatorrecommender.complex.macd | Use complex recommender for MACD | true |
aggregators.indicatorrecommender.complex.macd.buy | Use complex recommender for MACD buy | true |
aggregators.indicatorrecommender.complex.macd.buy.weighthistogramnode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.buy.weighthistogramdeltanode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.buy.weightmomemtumnode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.buy.weightmomemtumdeltanode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.sell | Use complex recommender for MACD sell | true |
aggregators.indicatorrecommender.complex.macd.sell.weighthistogramnode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.sell.weighthistogramdeltanode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.sell.weightmomemtumnode | JSON object | null |
aggregators.indicatorrecommender.complex.macd.sell.weightmomemtumdeltanode | JSON object | null |
aggregators.indicatorrecommender.complex.rsi | Use complex recommender for RSI | true |
aggregators.indicatorrecommender.complex.rsi.buy | Use complex recommender for RSI buy | true |
aggregators.indicatorrecommender.complex.rsi.buy.weightrsinode | JSON object | null |
aggregators.indicatorrecommender.complex.rsi.buy.weightrsideltanode | JSON object | null |
aggregators.indicatorrecommender.complex.rsi.sell | Use complex recommender for RSI sell | true |
aggregators.indicatorrecommender.complex.rsi.sell.weightrsinode | JSON object | null |
aggregators.indicatorrecommender.complex.rsi.sell.weightrsideltanode | JSON object | null |
aggregators.indicator | Use aggregated indicator | false |
aggregators.indicator.macd | Use aggregated indicator with MACD | false |
aggregators.indicator.rsi | Use aggregated indicator with RSI | false |
aggregators.indicator.extras | JSON object describing the units from other markets to use | "" |
aggregators.indicator.extrasdeltas | The delta days | 2 |
aggregators.indicator.extrasmacd | Use extras with MACD | false |
aggregators.indicator.extrasrsi | Use extras with RSI | false |
aggregators.indicator.futuredays | Number of future days for doing the classification | 10 |
aggregators.indicator.intervaldays | Interval days for going backward | 1 |
aggregators.indicator.threshold | The threshold for classifying increase or decrease. | 0 |
aggregators.mlmacd | Use the Machine Learning MACD | true |
Stockstat supports a handful of indicators. MACD, RSI and STOCHRSI require only the price or index at the end of the day. The indicators ATR, CCI and STOCH however, require also the minimum and maximum price or index from that day. In addition, Stockstat uses (some non-standard) value change (delta) for the last number of days (deltadays).
MACD has the most extensive machine learning support in Stockstat. When the MACD indicator histogram or momentum changes sign, it may be a buy or sell indicator. The downside is, there are a lot of false positives/negatives. It has been attempted to make the system learn what is true/false positives/negatives based on a consequecutive number of days before zero (turning sign) and then a number of consequecutive days after zero, with only one crossing of the zero.
Evolutionary programming has been used to make some formula to make recommendations based on the MACD and RSI values. If you want to use this, you have to press get recommender and set, for each market you will use.