How do I install the sample data from backtrader library?
-
Hi there,
I am trying to run the sample code from:
https://www.backtrader.com/blog/posts/2019-08-29-fractional-sizes/fractional-sizes/
,and it uses the sample data from backtrader library. Since I copy pasted the code and ran it, it says there is no such data, so I will assume I have to download it manually. And I guess this is where to get the data from:
https://github.com/mementum/backtraderBut how do I install it? the installation note :
Which I already did when I first installed backtrader.
-
You can get the full source code from here:
https://github.com/mementum/backtrader
-
@vladisld it would be helpful if you elaborate more. I have pasted the directory to my project directory and the problem persists. Which source code are you talking about?
-
@vladisld
My question is how do I install it? I apologize if my question is not clear.
-
@Gleetche said in How do I install the sample data from backtrader library?:
Which source code are you talking about?
Backtrader is an open source project. The data file mentioned in the blog post is part of the testing data sets available in the
/datas
sub-directory of the Backtrader's project source code which you may just clone from github. (I'm not sure those data sets are included in the installed package though).So the good way to play with the Backtrader's samples is to actually clone the Backtrader repository and work directly with it.
Alternatively you may just download this specific data file from directly from github and continue working with the installed package:
https://github.com/mementum/backtrader/blob/master/datas/2005-2006-day-001.txt
-
"So the good way to play with the Backtrader's samples is to actually clone the Backtrader repository and work directly with it."
and how do I do this? How do I clone the backtrader repository into my directory? or how do I place the specific data into the place where I needed to place? Where do i place it?
I have downloaded the file. I just don't know what do with it.
-
Because I have
- Downloaded the files
- Tried pasting it into several folders of my project files, expecting it would "fit".
and still:
- Downloaded the files
-
I solved it
@vladisld thanks