Comments (8)
i think it's not hard coded, there is a file called constants.py which contains declarations for more time intervals. Although the 5 minutes constant is given as a default value, you can change it while declaration.
from pgportfolio.
Can it be configured for 1 minute or 1 hour / day by using other data sources?
Sure, you can integrate broker's api to our framework. Replace pgportfolio/marketdata/poloniex.py
with your desired broker. And change period
at HistoManager
from globaldatamatrix
from pgportfolio.
Please note that 5 minutes is how the programme store the data, which is the minimum data interval of candle stick data on poloniex.
You can easily configure the interval of trading and observation by setting the "global_period" attribute in "net_config.json". The "global_period" should be a integer of multiple of 300.
from pgportfolio.
I have ohlc data with 1 min resolution in csv. How can I train a network on it? Custom loader, param config?
from pgportfolio.
I have ohlc data with 1 min resolution in csv. How can I train a network on it? Custom loader, param config?
In that case, you just need to rewrite the globaldatamatrix (in particular, the get_global_data_panel method).
I think that won't be too difficult, just load csv using pandas and then transform it into a panel. While If you want to keep the functionality of assets selection work, you might also need to modify the select_coins method.
from pgportfolio.
Hello, thanks for sharing the code.
I wonder if the self.__checkperiod call inside get_global_panel is not too restrictive.
Would period%300 == 0 work or does it need more db code, sums, etc.?
Regards.
from pgportfolio.
I wonder if the self.__checkperiod call inside get_global_panel is not too restrictive.
Would period%300 == 0 work or does it need more db code, sums, etc.?
Yes, the self.__checkperiod is already out of date.
I think period%300 == 0 should work on the new code.
from pgportfolio.
I want to ask a question about this sql query in the part of getting data from DB to pandas panel:
I think this query takes datas in range : [start_date + 300 sec, end_date - 300 sec]
It is ok for backtesting but I think need to update for real time testing, isn't it ?
sql = ("SELECT date+300 AS date_norm, close FROM History WHERE"
" date_norm>={start} and date_norm<={end}"
" and date_norm%{period}=0 and coin=\"{coin}\"".format(
start=start, end=end, period=period, coin=coin))
from pgportfolio.
Related Issues (20)
- Issue when downloading data HOT 1
- Segmentation fault during plot mode HOT 1
- 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
- KeyError: 'BTS_BTC' HOT 7
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.