This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from orderbook import OrderBook | |
class ElectraOrderBook(OrderBook): | |
def get_executed_trades(self): | |
trades_list=[] | |
#... | |
# do some magic with self.idontknowwhat variables, put them into the trades_list... | |
#... | |
return trades_list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
class DiffNormalizer(): | |
def __init__(self, diff_len=1): | |
self.diff_len = diff_len | |
self.fitted = False | |
self.first_values = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#loading model | |
loaded_model = NHiTSModel.load_from_checkpoint("old_checkpoint","/content/", best=True) | |
#defining new parameters | |
MODEL_NAME = "finetune_only" | |
from torch.optim import RAdam | |
OPTIMIZER_CLS = RAdam | |
BASE_LR = 0.00001 | |
EPOCHS = 25 |
OlderNewer