Comments (4)
Hey thanks for the nice comments. So first thing I should point out is in your output, your buy/sell thresholds are at default (65%). This may be a high confidence threshold if your data is not very predictable, and it's certainly believable that you'll get 0 buy/sell signals if that is the case.
Now, it looks like you were trying to change the thresholds to 10% which is a good way to debug. Thing is, you didn't actually change the parameters when you called the Backtest object. Change line 17 to:
backtest = Backtest(variables, trainStart, trainEnd, testStart, testEnd, buyThreshold = 0.1, sellThreshold = 0.1)
If that doesn't work, come back.
from clairvoyant.
@anfederico thank you for the reply!
I changed the buy and sell thresholds to .1 and .1 and ran the model again. I got 20850 total buys, 0 sells, and 51.89% buy accuracy. Do you have suggested values for the buy and sell thresholds, or a technique to determine the optimal ones?
from clairvoyant.
So the issue isn't the parameters, it's your data. I am 100% certain the 'Close' and 'Volume' are not a combination of financial indicators predictive of stock movement. And I'm sure you'll see with the visualization method that SVC is not going to find many hotspots for buying/selling.
I'd recommend doing some research about more advanced indicators or try getting your hands on some sentiment data, which is what I personally find to be the best kind of data for predicting short term changes in the market.
from clairvoyant.
@anfederico thanks for the heads up! I'll close the issue.
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.