Comments (7)
Can I see the first 5 lines of your data file?
from clairvoyant.
Can I see the first 5 lines of your data file?
Here is the data format:
Date,Open,High,Low,Close,Volume
28-Oct-16,53.65,53.84,53.11,53.53,6620333
27-Oct-16,53.60,53.83,53.13,53.59,7899957
26-Oct-16,53.60,53.84,53.36,53.63,5817798
25-Oct-16,54.10,54.17,53.50,53.67,6052830
24-Oct-16,53.90,54.46,53.89,54.18,6919714
from clairvoyant.
One thing that may be an issue is your dates should be in the opposite order. Also, I don't see the variables that you listed in the header of your csv file.
variables = ["SSO", "SSC"] # If you set "SSO" and "SSC", they should be in your header
Try to format your data so it looks like this
Date,Open,High,Low,Close,Volume,SSO,SCC
03/01/2013,27.72,27.98,27.52,27.95,34851872,65.7894736842,-0.121
03/04/2013,27.85,28.15,27.7,28.15,38167504,75.9450171821,0.832
03/05/2013,28.29,28.54,28.16,28.35,41437136,84.9230769231,0.151
03/06/2013,28.21,28.23,27.78,28.09,51448912,80.7799442897,-0.689
03/07/2013,28.11,28.28,28.005,28.14,29197632,73.5368956743,-0.821
from clairvoyant.
Can I make
variables = []
instead of
variables = ["SSO", "SSC"]
I don't understand SSO and SSC.
I downloaded the data from google finance.
from clairvoyant.
data.iloc[0]
Out[20]:
Date 01/02/2013
Open 27.3
High 27.5
Low 27.13
Close 27.5
Volume 13268930
Name: 0, dtype: object
data.iloc[0].round(3)
Traceback (most recent call last):
File "", line 1, in
data.iloc[0].round(3)
File "C:\Anaconda2\lib\site-packages\pandas\core\series.py", line 1234, in round
result = _values_from_object(self).round(decimals, out=out)
TypeError: can't multiply sequence by non-int of type 'float'
data = data.round(3) # Round all values
is causing the error. Might it cannot round the date?
from clairvoyant.
vinodpkd, SSO and SSC are custom-designed indicators that the author is using to train his model. At the end of his readme he provides a link to another project that is producing these values. Looks like he's mining social media to provide a social sentiment score.
If you don't understand the values, I think you can use any other data to train your model. For example, p/e ratios if you're more familiar with that indicator. Basically this training data is essential for the model to "learn" how to indicate a buy or sell. It uses a probabilistic classifier to over a training set in order to develop an association between the indicators and a buy or sell recommendation. So I think before you can continue any further, you have to provide at least some data as the indicator.
from clairvoyant.
Exactly, for example I see your dataset contains the header:
"Date,Open,High,Low,Close,Volume"
You could then do something like variables = ["High", "Low"] and the program will attempt to learn when to buy and when to sell based on the High and Low values of your data. Note that this is probably not going to work because the raw High/Low values alone are not very predictive of how the stock price will move. Therefore, you should try different indicators, like P/E for example.
"Date,Open,High,Low,Close,Volume,P/E"
Hope this helps!
from clairvoyant.
Related Issues (20)
- Bug in predict_proba? HOT 1
- Working example HOT 1
- ImportError: No module named 'backtester' HOT 7
- Dimensionality reduction with t-SNE
- Does trainStart and trainEnd not support date formats anymore? HOT 3
- IndexError: single positional indexer is out-of-bounds HOT 1
- IndexError: single positional indexer is out-of-bounds HOT 2
- SyntaxError: invalid syntax : "self.svc = SVC(**kwargs, probability=True)" HOT 4
- TypeError: a float is required: "self.svc.fit(self.scaler.transform(self.XX), self.yy)" HOT 5
- KeyError: 'EMA' HOT 1
- NameError: name 'backtester' is not defined HOT 7
- TypeError: 'str' object cannot be interpreted as an integer when running backtest.start() HOT 5
- data named 'SBUX.csv' HOT 1
- Code seems incorrect HOT 1
- Could you supply the file("SBUX.csv")? HOT 2
- Cannot Run Code HOT 4
- Error when running example: ufunc 'isfinite' not supported for the input types
- #HELP# Some errors appeared unusually HOT 1
- Project dependencies have API risk issues HOT 1
- Stock prediction tool
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 clairvoyant.