Comments (7)
Hello,
I am also facing this error. Seems like the error comes out when using class CoinList()
, there is a mismatch between dict key from self._polo.marketVolume()
and self._polo.marketTicker()
File "/home/tias/Data_science/1_project/zhengyaojiang_pgportfolio_dev/pgportfolio/marketdata/coinlist.py", line 36, in __init__
prices.append(1.0 / float(ticker[k]['last']))
KeyError: 'BTS_BTC'
from pgportfolio.
@tiassap did you solve the error?
from pgportfolio.
I could avoid KeyError: 'BTS_BTC'
by replacing the for-loop inside CoinList.__init__()
(inside coinlist.py
) with this
for k in ticker.keys():
if k.startswith("BTC_") or k.endswith("_BTC"):
pairs.append(k)
for c in k.split("_"):
if c != 'BTC':
if k.endswith('_BTC'):
coins.append('reversed_' + c)
prices.append(1.0 / float(ticker[k]['last']))
else:
coins.append(c)
prices.append(float(ticker[k]['last']))
else:
volumes.append(self.__get_total_volume(pair=k, global_end=end,
days=volume_average_days,
forward=volume_forward))
But there are still many errors will come out related to sql command line parsing and also error because in HistoryManager.get_global_panel()
pandas Panel is used (deprecated since pandas version 0.20.0)
from pgportfolio.
@tiassap this helped in removing KeyError: 'BTS_BTC'
. But I am also facing multiple errors in HistoryManager.get_global_panel()
.
Were you able to successfully run this project? If yes can you please share the code?
Any sort of help is appreciated.
from pgportfolio.
I could avoid
KeyError: 'BTS_BTC'
by replacing the for-loop insideCoinList.__init__()
(insidecoinlist.py
) with thisfor k in ticker.keys(): if k.startswith("BTC_") or k.endswith("_BTC"): pairs.append(k) for c in k.split("_"): if c != 'BTC': if k.endswith('_BTC'): coins.append('reversed_' + c) prices.append(1.0 / float(ticker[k]['last'])) else: coins.append(c) prices.append(float(ticker[k]['last'])) else: volumes.append(self.__get_total_volume(pair=k, global_end=end, days=volume_average_days, forward=volume_forward))
But there are still many errors will come out related to sql command line parsing and also error because in
HistoryManager.get_global_panel()
pandas Panel is used (deprecated since pandas version 0.20.0)
did you solve the error?
from pgportfolio.
you could use xarray.DataArray
https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html
from pgportfolio.
@dekrypting-karma , @lucacarniato
Sorry I was unable to response for a long time.
I created Docker container to make environment so we can use old pandas version and old tensorflow module here: https://github.com/tiassap/PGPortfolio
Seems like there is still problem with Binance API.. Please try it and help me make the code works again.
from pgportfolio.
Related Issues (20)
- User Guide Plot HOT 2
- Three questions HOT 2
- Does your model support no-transction allowed periods
- Meaning of figures like 0.00900002 in SqlLite history table for ETH
- pandas panel HOT 3
- mu might be miscalculated
- A Error in data Processing HOT 1
- validation set and hyperparameters tuning
- question about decide_by_history
- Lower portfolio values for recent dates(e.g. "start_date":"2018/08/17", "end_date":"2020/11/19") HOT 1
- ERROR:root:the sqlite error happend HOT 1
- TypeError: object() takes no parameters HOT 1
- Conversion of globaldatamatrix panel to Dataframe (panel is deprecated) HOT 4
- Fix: train_summary.csv not generated
- Normalization on open price HOT 1
- Problem of dtype arguments
- How to run this agent
- when I download the data. KeyError: 'BTS_BTC' what is the problem? HOT 5
- non-resource variables are not supported in the long term HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgportfolio.