spectre icon indicating copy to clipboard operation
spectre copied to clipboard

GPU-accelerated Factors analysis library and Backtester

Results 8 spectre issues
Sort by recently updated
recently updated
newest added

'https://etfdailynews.com/etf/spy/' this page is invalid now

What I did: I followed readme and added initial code but it isn't works ```python !pip install --no-deps git+git://github.com/Heerozh/spectre.git !pip install pytorch torchvision torchaudio !pip install pyarrow pandas tqdm plotly...

Running the Backtest in your readme.md (without any modification), I ran into this problem def drawdown_split(x): nonlocal dd_group if dd[x] == 0:

hello, I'm trying to create a dataset and one feature I'd like to encode is WEEKDAY as a one-hot encoded vector I tried: `engine.add(factors.filter.OneHotEncoder(factors.WEEKDAY), "weekday")` and `engine.add(factors.WEEKDAY.one_hot(), "weekday")` seems to...

Other than ohlcv columns ('open', 'high', 'low', 'close', 'volume') and adjustments columns ('ex-dividend', 'split_ratio'), how do we add fundamentals data columns? Thanks a lot

question

请教,针对A股运行如下代码 `from spectre.data import ArrowLoader import torch from spectre.factors import * from spectre.factors.basic import * loader = ArrowLoader('./Ashare.feather') engine = FactorEngine(loader) if torch.cuda.is_available(): print("GPU is available.") engine.to_cuda() else: print("GPU is...

您好,非常感谢您开源这个超棒的库。我研究了一下,有个关于复权的问题请教。 在为spectre准备csv数据的时候,假设csv里提供的ohlcv是原始价格,然后提供了额外两列,dividend, split_ratio,按我的理解,spectre在计算因子时,能够自动根据分红和分割比率来执行动态复权。 我使用的是米筐的分红送股数据。我发现,米筐只有送股才产生split数据,如果是配股,则没有split数据。 我的问题是,公司发生了配股,在csv文件中,dividend, split_ratio这两列应该怎么填?是不是dividend要填负数(因为是向公司交钱),split_ratio就按配股比率填? 还有,公司增发的复权处理是不是也像配股一样处理? 谢谢!

I’ve modified the CustomAlgorithm._data_updated() method to prevent recalculating the factors each time. Instead, it now extracts the required period’s factor data from the already obtained full-period factor data. The full-period...