Commit Graph

156 Commits

Author SHA1 Message Date
robcaulk
647200e8a7 isort 2022-09-23 19:30:56 +02:00
robcaulk
77c360b264 improve typing, improve docstrings, ensure global tests pass 2022-09-23 19:17:27 +02:00
robcaulk
ea8e34e192 Merge branch 'develop' into dev-merge-rl 2022-09-22 19:46:50 +02:00
robcaulk
8aac644009 add tests. add guardrails. 2022-09-15 00:46:35 +02:00
robcaulk
81417cb795 Merge branch 'develop' into dev-merge-rl 2022-09-14 22:49:11 +02:00
Emre
330d7068ab
Merge branch 'develop' into add-xgboostclassifier 2022-09-10 23:59:11 +03:00
robcaulk
5a0cfee27e allow user to multithread jobs (advanced users only) 2022-09-10 22:16:49 +02:00
Emre
60eb02bb62
Add XGBoostClassifier 2022-09-10 20:13:16 +03:00
robcaulk
10b6aebc5f enable continual learning and evaluation sets on multioutput models. 2022-09-10 16:54:13 +02:00
robcaulk
a826c0eb83 ensure signatures match, reduce verbosity 2022-09-09 19:30:53 +02:00
Emre
acb410a0de Remove verbosity params 2022-09-09 19:30:53 +02:00
Emre
df6e43d2c5 Add XGBoostRegressorMultiTarget class 2022-09-09 19:30:53 +02:00
Emre
1b6410d7d1 Add XGBoostRegressor for freqAI, fix mypy errors 2022-09-09 19:30:53 +02:00
robcaulk
4c9ac6b7c0 add kwargs, reduce duplicated code 2022-09-07 18:58:55 +02:00
robcaulk
97077ba18a add continual learning to catboost and friends 2022-09-06 20:30:46 +02:00
robcaulk
240b529533 fix tensorboard path so that users can track all historical models 2022-08-31 16:50:39 +02:00
robcaulk
7766350c15 refactor environment inheritence tree to accommodate flexible action types/counts. fix bug in train profit handling 2022-08-28 19:21:57 +02:00
robcaulk
3199eb453b reduce code for base use-case, ensure multiproc inherits custom env, add ability to limit ram use. 2022-08-25 19:05:51 +02:00
robcaulk
05ccebf9a1 automate eval freq in multiproc 2022-08-25 12:29:48 +02:00
robcaulk
94cfc8e63f fix multiproc callback, add continual learning to multiproc, fix totalprofit bug in env, set eval_freq automatically, improve default reward 2022-08-25 11:46:18 +02:00
robcaulk
d1bee29b1e improve default reward, fix bugs in environment 2022-08-24 18:32:40 +02:00
robcaulk
bd870e2331 fix monitor bug, set default values in case user doesnt set params 2022-08-24 16:32:14 +02:00
robcaulk
c0cee5df07 add continual retraining feature, handly mypy typing reqs, improve docstrings 2022-08-24 13:00:55 +02:00
robcaulk
b708134c1a switch multiproc thread count to rl_config definition 2022-08-24 13:00:55 +02:00
robcaulk
b26ed7dea4 fix generic reward, add time duration to reward 2022-08-24 13:00:55 +02:00
robcaulk
29f0e01c4a expose environment reward parameters to the user config 2022-08-24 13:00:55 +02:00
robcaulk
3eb897c2f8 reuse callback, allow user to acces all stable_baselines3 agents via config 2022-08-24 13:00:55 +02:00
sonnhfit
4baa36bdcf fix persist a single training environment for PPO 2022-08-24 13:00:55 +02:00
robcaulk
f95602f6bd persist a single training environment. 2022-08-24 13:00:55 +02:00
robcaulk
5d4e5e69fe reinforce training with state info, reinforce prediction with state info, restructure config to accommodate all parameters from any user imported model type. Set 5Act to default env on TDQN. Clean example config. 2022-08-24 13:00:55 +02:00
robcaulk
b90da46b1b improve price df handling to enable backtesting 2022-08-24 13:00:55 +02:00
sonnhfit
0475b7cb18 remove unuse code and fix coding conventions 2022-08-24 13:00:55 +02:00
MukavaValkku
d60a166fbf multiproc TDQN with xtra callbacks 2022-08-24 13:00:55 +02:00
robcaulk
dd382dd370 add monitor to eval env so that multiproc can save best_model 2022-08-24 13:00:55 +02:00
robcaulk
e5df39e891 ensuring best_model is placed in ram and saved to disk and loaded from disk 2022-08-24 13:00:55 +02:00
robcaulk
bf7ceba958 set cpu threads in config 2022-08-24 13:00:55 +02:00
MukavaValkku
57c488a6f1 learning_rate + multicpu changes 2022-08-24 13:00:55 +02:00
robcaulk
acf3484e88 add multiprocessing variant of ReinforcementLearningPPO 2022-08-24 13:00:55 +02:00
MukavaValkku
13cd18dc9a PPO policy change + verbose=1 2022-08-24 13:00:55 +02:00
robcaulk
926023935f make base 3ac and base 5ac environments. TDQN defaults to 3AC. 2022-08-24 13:00:55 +02:00
MukavaValkku
096533bcb9 3ac to 5ac 2022-08-24 13:00:55 +02:00
MukavaValkku
718c9d0440 action fix 2022-08-24 13:00:55 +02:00
robcaulk
9c78e6c26f base PPO model only customizes reward for 3AC 2022-08-24 13:00:55 +02:00
robcaulk
6048f60f13 get TDQN working with 5 action environment 2022-08-24 13:00:55 +02:00
robcaulk
d4db5c3281 ensure TDQN class is properly named 2022-08-24 13:00:55 +02:00
robcaulk
91683e1dca restructure RL so that user can customize environment 2022-08-24 13:00:55 +02:00
sonnhfit
ecd1f55abc add rl module 2022-08-24 13:00:55 +02:00
MukavaValkku
9b895500b3 initial commit - new dev branch 2022-08-24 13:00:55 +02:00
MukavaValkku
cd3fe44424 callback function and TDQN model added 2022-08-24 13:00:55 +02:00
MukavaValkku
01232e9a1f callback function and TDQN model added 2022-08-24 13:00:55 +02:00
MukavaValkku
8eeaab2746 add reward function 2022-08-24 13:00:55 +02:00
MukavaValkku
ec813434f5 ReinforcementLearningModel 2022-08-24 13:00:55 +02:00
MukavaValkku
2f4d73eb06 Revert "ReinforcementLearningModel"
This reverts commit 4d8dfe1ff1daa47276eda77118ddf39c13512a85.
2022-08-24 13:00:55 +02:00
MukavaValkku
c1e7db3130 ReinforcementLearningModel 2022-08-24 13:00:55 +02:00
robcaulk
05ed1b544f Working base for reinforcement learning model 2022-08-24 13:00:40 +02:00
robcaulk
4c0fda400f fix input shape warning for LGBMClassifier, add sample_weights/eval_weights 2022-08-16 11:41:53 +02:00
Robert Caulk
c9c128f781 finalize logo, improve doc, improve algo overview, fix base tensorflowmodel for mypy 2022-08-14 02:49:01 +02:00
robcaulk
58de20af0f make BaseClassifierModel. Add predict_proba to lightgbm 2022-08-13 20:07:31 +02:00
robcaulk
b1b76a2dbe debug classifier with predict proba 2022-08-13 19:40:24 +02:00
robcaulk
23cc21ce59 add predict_proba to base classifier, improve historic predictions handling 2022-08-13 19:40:24 +02:00
robcaulk
eb8bde37c1 Add lightgbm classifier, add classifier check test, fix classifier bug. 2022-08-06 17:51:21 +02:00
Robert Caulk
07763d0d4f add classifier, improve model naming scheme 2022-08-06 08:33:55 +02:00
robcaulk
f22b140782 fix backtesting bug, undo move of label stat calc, fix example strat exit logic 2022-07-29 17:27:35 +02:00
robcaulk
59624181bd isort BaseRegressionModel imports 2022-07-29 08:23:44 +02:00
robcaulk
c84d54b35e Fix typing issue, avoid using .get() when unnecessary, convert to fstrings 2022-07-29 08:12:50 +02:00
robcaulk
324e54c015 fix possible memory leak associated with Catboost Pool object 2022-07-26 17:29:29 +02:00
robcaulk
3f149c4067 fix return type in BaseTensorFlowModel 2022-07-26 16:01:54 +02:00
robcaulk
e213d0ad55 isolate data_drawer functions from data_kitchen, accommodate tests, add new test 2022-07-26 10:24:14 +02:00
robcaulk
56b17e6f3c allow user to pass test_size = 0 and avoid using eval sets in prediction models 2022-07-25 19:40:13 +02:00
Robert Caulk
7b105532d1 fix mypy error and add test for principal component analysis 2022-07-25 11:46:59 +02:00
Matthias
520ee3f7a1 Convert freqAI into packages 2022-07-24 17:07:45 +02:00
Matthias
1885deb632 More docstring changes 2022-07-24 16:54:39 +02:00
Robert Caulk
88e10f7306 add exception for not passing timerange. Remove hard coded arguments for CatboostPredictionModels. Update docs 2022-07-24 09:01:23 +02:00
robcaulk
f3d46613ee move prediction denormalization into datakitchen. remove duplicate associated code. avoid normalization/denormalization for string dtypes. 2022-07-23 17:14:33 +02:00
robcaulk
98c8a447b2 add LightGBMPredictionMultiModel 2022-07-22 12:40:51 +02:00
lolong
9c051958a6
Feat/freqai (#7105)
Vectorize weight setting, log training dates

Co-authored-by: robcaulk <rob.caulk@gmail.com>
2022-07-19 17:49:18 +02:00
lolong
ed0f8b1189
Improve FreqAI documentation (#7072)
Improve doc + some other small fixes

Co-authored-by: robcaulk <rob.caulk@gmail.com>
2022-07-18 11:57:52 +02:00
robcaulk
4141d165ff add BaseTensorFlowModel class 2022-07-12 19:10:09 +02:00
robcaulk
ef409dd345 Add ground work for TensorFlow models, add protections from common mistakes 2022-07-12 18:09:17 +02:00
Robert Caulk
fea63fba12 Fix saving/loading historic predictions 2022-07-12 10:12:50 +02:00
Robert Caulk
8ce6b18318 start collecting indefinite history of predictions. Allow user to generate statistics on these predictions. Direct FreqAI to save these to disk and reload them if available. 2022-07-11 22:01:48 +02:00
Matthias
3fc92b1b21 Create BaseRegression model - designed to reduce code duplication across currently available models. 2022-07-11 11:33:59 +02:00
Robert Caulk
607455919e Change config parameter names to improve clarity and consistency throughout the code (!!breaking change, please check discord support channel for migration instructions or review templates/FreqaiExampleStrategy.py config_examples/config_freqai_futures.example.json file changes!!) 2022-07-10 12:35:44 +02:00
Matthias
819cc9c0e4 Fully align LightGBM with Catboost 2022-07-10 11:06:18 +02:00
Matthias
58b18770e3 Fix LightGBM missing argument in predict method 2022-07-10 11:05:35 +02:00
Matthias
2e1061af64 Fix faulty LightGBM model 2022-07-09 08:21:42 +00:00
robcaulk
8ac8d53c32 All LGBMRegressor model parameters are now set in config 2022-07-03 16:30:01 +02:00
robcaulk
ffb39a5029 black formatting on freqai files 2022-07-03 10:59:38 +02:00
robcaulk
106131ff0f Rehaul organization of return values 2022-07-02 18:09:38 +02:00
robcaulk
051b99791d reduce unnecessary verbosity, fix error on first training sweep, add LightGBMPredictionModel 2022-06-26 19:04:23 +02:00
robcaulk
f631ae911b add model expiration feature, fix bug in DI return values 2022-06-17 14:55:40 +02:00
robcaulk
c5de0c49e4 first functional scanning commit 2022-06-16 00:24:18 +02:00
Matthias
c981ad4608 Fix missing space 2022-06-12 08:31:02 +02:00
robcaulk
15d049cffe detect if upper tf candles are new or not, append if so. Correct the epoch for candle update check 2022-06-07 19:49:20 +02:00
robcaulk
f2762e3b4b fix bug in return_values() 2022-06-03 16:58:51 +02:00
robcaulk
16b4a5b71f rehaul of backend data management - increasing performance by holding history in memory, reducing load on the ratelimit by only pinging exchange once per candle. Improve code readability. 2022-06-03 15:19:46 +02:00
robcaulk
c5a16e91fb throw user error if user tries to load models but feeds the wrong features (while using PCA) 2022-05-28 11:11:41 +02:00
robcaulk
6193205012 fix bug for target_mean/std array merging in backtesting 2022-05-26 21:07:50 +02:00
robcaulk
255d35976e add priority metadata to pairs to avoid a sync of train time + train period 2022-05-24 12:58:53 +02:00
robcaulk
059c285425 paying closer attention to managing live retraining on separate thread without affecting prediction of other coins on master thread 2022-05-24 12:01:01 +02:00