Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Trailing Strategy SL not working? #1248

bravegag started this conversation in General
Discussion options

Hi all, I've copy pasted the TrailingStop example from the documentation but I'm not understanding why the stop loss doesn't get activated and have massive losses. The example I copy-pasted is the SmaCross from here:
https://kernc.github.io/backtesting.py/doc/examples/Strategies%20Library.html

but I get massive drawdowns meaning the SL is not offering a true downside protection. How can I change the TrailingStop Strategy's SL to make it as tight as possible?
image

I am now using Miniconda 25.1 with Python 3.12 and backtesting 0.6.3

UPDATE
In general, I find the library very neat but the results counter-intuitive, I have a signal that gives me 70-80% precision with really good classification prediction and still losses almost everything while backtesting it ... the common wisdom says if you are able to build a signal with 52% hit rate you should be able to make money in trading. I am struggling to prove that wisdom right ...

Look at this beauty but overall I lose nearly all the initial equity:
image

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /