-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
A few questions on the backtest output plot #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This project has a Regarding 2.) The second plot top to bottom is indeed showing the trades. The size of the triangle represents the relative size of the trade. For example, in the beginning you might only be trading 100 shares of Google, but assuming your strategy is profitable, towards the end of the backtest, you are hopefully trading thousands of shares of Google, and the size of the triangle will reflect that. The direction of the triangle is whether it was a Long (arrow up) or a short trade (arrow down), the color of the triangle is the profitability of the trade (red = loss, green = profit). 3.) Third plot is the Price series, your indicators from your strategy, and the trades. The trades are the "tractor beams" as I call them. See the picture below. I have circled a profitable (green) trade. Red represents a losing trade. Regarding Title, I am pretty sure you can customize the charts. I know I have previously fiddled with the legend to suit my needs. Check out the documentation to see what all you can do without fiddling with the source code. https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#backtesting.backtesting.Backtest.plot 4.) You can do this with the trades dataframe that is produced as a result of running the backtest. |
Adding to @eervin123's great answer:
|
Thanks a lot both! it makes a lot of sense. |
I have been looking into this project, and everything looks great. I have a few questions on the main plot visualization example https://kernc.github.io/backtesting.py/#example, which would appreciate if someone could help.
The text was updated successfully, but these errors were encountered: