Giter VIP home page Giter VIP logo

pgportfolio-pytorch's People

Contributors

amitadate avatar iffix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pgportfolio-pytorch's Issues

Feature Normalization

Follow to the paper you should normalize input features to the last close price in batch. Take this into account, you can change line to next

X = batch[:, :, :, :-1] / batch[:, :1, :, -2][..., None]

This change can achieve a better result

Data set problem

Hello, the data set I downloaded is always 162M, can you share the complete data set when you ran the code before to me, thank you.

torch=1.5.0

ERROR: Could not find a version that satisfies the requirement torch==1.5.0
ERROR: No matching distribution found for torch==1.5.0

and If I use LTS version(1.9.0) dependency conflict happens.
can you please guide me how to handle this issue?

About the config file

Thank you for your previous answers to my question, it was very helpful to me. I have a test/config file and a config file, but I found two problems when I ran it.
(1) I tried to split the 2760 size sample by modifying the start_date and end_date of the two config files according to your previous answer. My config file start_date is 2017/3/27, end_date is 2017/4/27, but I The start_date set for the test/config file is 2014/11/01 and the end_date is 2016/10/28, but once main.py is run, the start and end time of the test/config file will become the same as the config file.
(2) If I change the time of the config file to start_date is 2015/05/01 and end_date is 2016/05/01, an error message will be reported (the length of selected coins 7 is not equal to expected 11).
So, I am very curious, how should I split the 2760 samples?

fast_train problem

Sorry to interrupt you again, I want to ask how fast_train in the tradertrainer judges that the training has achieved good results, and what is the difference with train?If I set fast_train to false, it will prompt “Metircs object has not attribute evaluate”.

Change batch_size size

Hello, I found that the batch_size is very large during the operation. I adjusted it down in the config but the first dimension of the matrix is still large and changing. Do you have any solutions? How do I change the first dimension of the matrix? ?

backtest

Hello, I ran your original program, but during the backtest, I found that the number in the csv table of nn when the config is changed always keeps the original value. What is the reason?

Unable to connect because the target computer actively refused

Hello,When I executed the first download of data,it shows
urllib.error.URLError: <urlopen error Error connecting to SOCKS5 proxy localhost:1082: [WinError 10061] was displayed because the target computer actively refused to connect.

How to solve this problem ?

download data error

INFO:root:Checking market values.
INFO:root:Poloniex command: return24hVolume, args: None
Traceback (most recent call last):
File "D:\Anaconda3\envs\pytorch\lib\site-packages\sockshandler.py", line 52, in connect
sock = socks.create_connection(
AttributeError: module 'socks' has no attribute 'create_connection'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 174, in
main()
File "main.py", line 111, in main
coin_data_manager_init_helper(
File "D:\PGPortfolio-pytorch\pgportfolio\marketdata\coin_data_manager.py", line 348, in coin_data_manager_init_helper
cdm = CoinDataManager(
File "D:\PGPortfolio-pytorch\pgportfolio\marketdata\coin_data_manager.py", line 22, in init
self._coin_list = CoinList(end, volume_average_days, volume_forward)
File "D:\PGPortfolio-pytorch\pgportfolio\marketdata\coin_list.py", line 13, in init
vol = self._polo.market_volume()
File "D:\PGPortfolio-pytorch\pgportfolio\marketdata\poloniex.py", line 45, in market_volume
return self.api('return24hVolume')
File "D:\PGPortfolio-pytorch\pgportfolio\marketdata\poloniex.py", line 95, in api
ret = opener.open(Request(url + urlencode(args)))
File "D:\Anaconda3\envs\pytorch\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "D:\Anaconda3\envs\pytorch\lib\urllib\request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "D:\Anaconda3\envs\pytorch\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\sockshandler.py", line 101, in https_open
return self.do_open(build, req)
File "D:\Anaconda3\envs\pytorch\lib\urllib\request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "D:\Anaconda3\envs\pytorch\lib\http\client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\Anaconda3\envs\pytorch\lib\http\client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\Anaconda3\envs\pytorch\lib\http\client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\Anaconda3\envs\pytorch\lib\http\client.py", line 1011, in _send_output
self.send(msg)
File "D:\Anaconda3\envs\pytorch\lib\http\client.py", line 951, in send
self.connect()
File "D:\Anaconda3\envs\pytorch\lib\site-packages\sockshandler.py", line 73, in connect
SocksiPyConnection.connect(self)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\sockshandler.py", line 57, in connect
except socks.SOCKS4Error as e:
AttributeError: module 'socks' has no attribute 'SOCKS4Error'

About requirements

requirements.txt
I tried to run this program on rtx3090, but the environment mismatch restricted my operation. First of all, pandas only supports panel function 0.23.4 and below. Secondly, I am cuda 11.1 and only support pytorch 1.8.1 and above. The above is my modified requirements.txt for cuda10.2, if I want to run this program on cuda11.1, not only need to change the pytorch version to 1.8.1, but also need to change other environment versions (I haven’t tried this part yet. ). (1) I tried to search for how to replace the panel function on the Internet but did not find any useful results. (2) I'm wondering if I can't draw a line chart, will it be the version of matplotlib that I have modified.

GPUs in parallel

Thank you for your answer to my question, it is very useful after I read it. My main problem now is cuda out of memory. I tried to modify the device to cpu on the command line but an error was reported, so I want to use two GPUs in parallel to solve this problem. Which part of the code needs to be modified for this operation?

No broken line in the resulting picture

Thank you for your answer to my last question.When I am running the command line

python main.py --mode plot --working_dir test --offline --algos nn,best,crp,rmr,ons

I met two problems.1)The command line will be stuck and there is no broken line in the resulting picture.
2)I want to know the range of training set and test set used by this code. The data set I downloaded through the command line is 162M. I don’t know if it is the same size as your original data set.
I hope to get your answer,thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.