AI4Finance-Foundation / AI4Finance-Foundation/FinRL

FinRL_PaperTrading_Demo Numpy Array Transformation Failure

オープン
#604 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Jupyter Notebook
スター
16.3k
フォーク
3.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

Running into issues with the `FinRL_PaperTrading_Demo.ipynb` tutorial, replicated both locally and on [the Google Colab](https://colab.research.google.com/github/AI4Finance-Foundation/FinRL/blob/master/tutorials/3-Practical/FinRL_PaperTrading_Demo.ipynb#scrollTo=Rzj0vjZZHdGM).

```
---------------------------------------------------------------------------

ValueError Traceback (most recent call last)

[](https://localhost:8080/#) in ()
----> 1 price_array, tech_array, turbulence_array = DP.df_to_array(data, if_vix='True')

2 frames

<__array_function__ internals> in hstack(*args, **kwargs)

[/usr/local/lib/python3.7/dist-packages/numpy/core/shape_base.py](https://localhost:8080/#) in hstack(tup)
343 return _nx.concatenate(arrs, 0)
344 else:
--> 345 return _nx.concatenate(arrs, 1)
346
347

<__array_function__ internals> in concatenate(*args, **kwargs)

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 2190 and the array at index 1 has size 2186
```

The number of rows for each unique ticker don't match, hence the concatenation will fail. Is there some data cleaning step missing from this tutorial that needs to be added?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。