βΉοΈ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | FAIL | download_stamp > now() - 6 MONTH | 7.4 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy |
| Last Crawled | 2025-08-28 03:27:05 (7 months ago) |
| First Indexed | not set |
| HTTP Status Code | 200 |
| Meta Title | time series - Optimize Bollinger Bands Strategy - Quantitative Finance Stack Exchange |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | This might not be a direct response, but just some general advise / ideas. I think giving you "optimal" parameters is not a straight realistic response. It depends on the security you are analizing. For instance, what you can do is grab a set of historical years, run multiple simulations on different parameters, and check which ones provide you the higher return (you can use a risk-adjusted performance metric, e.g., sharpe ratio). There are other strategies you can also try, such as the Momentum one. If you want to explore machine learning on it, you can check out Marcos Lopez de Prado's book on advances in financial machine learning. You can also backtest using Quantopian . Bollinger Bands is a common strategy, thus you might find some implementations of it already, to use as reference. |
| Markdown | [Skip to main content](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy#content)
#### Stack Exchange Network
Stack Exchange network consists of 183 Q\&A communities including [Stack Overflow](https://stackoverflow.com/), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
[Visit Stack Exchange](https://stackexchange.com/)
1. - [Tour Start here for a quick overview of the site](https://quant.stackexchange.com/tour)
- [Help Center Detailed answers to any questions you might have](https://quant.stackexchange.com/help)
- [Meta Discuss the workings and policies of this site](https://quant.meta.stackexchange.com/)
- [About Us Learn more about Stack Overflow the company, and our products](https://stackoverflow.co/)
2. ### [current community](https://quant.stackexchange.com/)
- [Quantitative Finance](https://quant.stackexchange.com/)
[help](https://quant.stackexchange.com/help) [chat](https://chat.stackexchange.com/?tab=all&sort=active)
- [Quantitative Finance Meta](https://quant.meta.stackexchange.com/)
### your communities
[Sign up](https://quant.stackexchange.com/users/signup?ssrc=site_switcher&returnurl=https%3A%2F%2Fquant.stackexchange.com%2Fquestions%2F59557%2Foptimize-bollinger-bands-strategy) or [log in](https://quant.stackexchange.com/users/login?ssrc=site_switcher&returnurl=https%3A%2F%2Fquant.stackexchange.com%2Fquestions%2F59557%2Foptimize-bollinger-bands-strategy) to customize your list.
### [more stack exchange communities](https://stackexchange.com/sites)
[company blog](https://stackoverflow.blog/)
3. [Log in](https://quant.stackexchange.com/users/login?ssrc=head&returnurl=https%3A%2F%2Fquant.stackexchange.com%2Fquestions%2F59557%2Foptimize-bollinger-bands-strategy)
4. [Sign up](https://quant.stackexchange.com/users/signup?ssrc=head&returnurl=https%3A%2F%2Fquant.stackexchange.com%2Fquestions%2F59557%2Foptimize-bollinger-bands-strategy)
[](https://quant.stackexchange.com/)
1. 1. [Home](https://quant.stackexchange.com/)
2. [Questions](https://quant.stackexchange.com/questions)
3. [Unanswered](https://quant.stackexchange.com/unanswered)
4. [AI Assist Labs](https://stackoverflow.ai/)
5. [Tags](https://quant.stackexchange.com/tags)
6. [Chat](https://chat.stackexchange.com/rooms/158962/stack-exchange-lobby)
7. [Users](https://quant.stackexchange.com/users)
2. Teams

Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
[Try Teams for free](https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=quant-community&utm_campaign=side-bar&utm_content=explore-teams) [Explore Teams](https://stackoverflow.co/teams/?utm_medium=referral&utm_source=quant-community&utm_campaign=side-bar&utm_content=explore-teams)
3. [Teams]()
4. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. [Explore Teams](https://stackoverflow.co/teams/?utm_medium=referral&utm_source=quant-community&utm_campaign=side-bar&utm_content=explore-teams-compact)
**Teams**
Q\&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[Learn more about Teams](https://stackoverflow.co/teams/)
# [Optimize Bollinger Bands Strategy](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy)
[Ask Question](https://quant.stackexchange.com/questions/ask)
Asked
4 years, 9 months ago
Modified [4 years, 5 months ago](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy?lastactivity "2021-03-15 14:09:30Z")
Viewed 462 times
0
\$\\begingroup\$
I was proving a very simple strategy with Bollinger Bands for a intraday timeframe (1 minute) that buy on lower band and sell in a higher band (Very common strategy), but in backtesting in E-Mini SP 500 at 1999 I think that it generated interesting results. This the graphic:
[](https://i.sstatic.net/QnW5C.png)
It's not winner but for a long period of the year it was profitable. First, considering that I'm a newbie i could like that you tell me if it can achieve to something profitable with some optimization, and if it so, what kind of optimization can I implement? or if it's a rubbish and I should try with other stuff
I was thinking that maybe I could implement some kind of machine learning for detect abrupt raises or falls prices which are the main problem as show in the image below
[](https://i.sstatic.net/xTpcv.png)
Or something with statistics that I should learn (my statistic knowledge it's not very widely) and prove
Any advice it would be greatly appreciated
- [time-series](https://quant.stackexchange.com/questions/tagged/time-series "show questions tagged 'time-series'")
- [quant-trading-strategies](https://quant.stackexchange.com/questions/tagged/quant-trading-strategies "show questions tagged 'quant-trading-strategies'")
- [optimization](https://quant.stackexchange.com/questions/tagged/optimization "show questions tagged 'optimization'")
[Share](https://quant.stackexchange.com/q/59557 "Short permalink to this question")
[Improve this question](https://quant.stackexchange.com/posts/59557/edit)
Follow
asked Nov 24, 2020 at 0:25
[](https://quant.stackexchange.com/users/47821/caeta)
[Caeta](https://quant.stackexchange.com/users/47821/caeta)Caeta
10322 bronze badges
\$\\endgroup\$
3
- 1
\$\\begingroup\$ I absolutely would not approach this as a tradeable strategy, but it could be a good project to learn statistics with. \$\\endgroup\$
β [steveo'america](https://quant.stackexchange.com/users/31456/steveoamerica "547 reputation")
Commented Nov 24, 2020 at 1:04
- \$\\begingroup\$ I have to give you credit for testing this far away... a millennium ago. Have you checked that the index methodology and the contract terms were the same in 1999 as it they are now, apples to apples? \$\\endgroup\$
β [Sergei Rodionov](https://quant.stackexchange.com/users/17588/sergei-rodionov "1,170 reputation")
Commented Mar 15, 2021 at 17:01
- \$\\begingroup\$ No, I didn't know that was relevant for test this simple algo \$\\endgroup\$
β [Caeta](https://quant.stackexchange.com/users/47821/caeta "103 reputation")
Commented Mar 17, 2021 at 15:04
[Add a comment](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.") \|
## 1 Answer 1
Sorted by:
[Reset to default](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy?answertab=scoredesc#tab-top)
2
\$\\begingroup\$
This might not be a direct response, but just some general advise / ideas.
I think giving you "optimal" parameters is not a straight realistic response. It depends on the security you are analizing. For instance, what you can do is grab a set of historical years, run multiple simulations on different parameters, and check which ones provide you the higher return (you can use a risk-adjusted performance metric, e.g., sharpe ratio).
There are other strategies you can also try, such as the Momentum one. If you want to explore machine learning on it, you can check out Marcos Lopez de Prado's book on advances in financial machine learning. You can also backtest using [Quantopian](https://www.quantopian.com/).
Bollinger Bands is a common strategy, thus you might find some [implementations](https://towardsdatascience.com/bollinger-bands-statistics-in-trading-dcc8783a8f88) of it already, to use as reference.
[Share](https://quant.stackexchange.com/a/59559 "Short permalink to this answer")
[Improve this answer](https://quant.stackexchange.com/posts/59559/edit)
Follow
[edited Mar 15, 2021 at 14:09](https://quant.stackexchange.com/posts/59559/revisions "show all edits to this post")
answered Nov 24, 2020 at 2:09
[](https://quant.stackexchange.com/users/33451/f0l0w)
[F0l0w](https://quant.stackexchange.com/users/33451/f0l0w)F0l0w
34611 silver badge1414 bronze badges
\$\\endgroup\$
[Add a comment](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy "Use comments to ask for more information or suggest improvements. Avoid comments like β+1β or βthanksβ.") \|
Start asking to get answers
Find the answer to your question by asking.
[Ask question](https://quant.stackexchange.com/questions/ask)
Explore related questions
- [time-series](https://quant.stackexchange.com/questions/tagged/time-series "show questions tagged 'time-series'")
- [quant-trading-strategies](https://quant.stackexchange.com/questions/tagged/quant-trading-strategies "show questions tagged 'quant-trading-strategies'")
- [optimization](https://quant.stackexchange.com/questions/tagged/optimization "show questions tagged 'optimization'")
See similar questions with these tags.
#### Related
[23](https://quant.stackexchange.com/questions/1832/techniques-to-optimize-the-placement-of-orders-in-market-making-strategy "Question score (upvotes - downvotes)")
[Techniques to optimize the placement of orders in market making strategy?](https://quant.stackexchange.com/questions/1832/techniques-to-optimize-the-placement-of-orders-in-market-making-strategy)
[4](https://quant.stackexchange.com/questions/18674/how-to-optimize-return-in-a-moving-average-crossover-algorithm "Question score (upvotes - downvotes)")
[How to optimize return in a moving average crossover algorithm](https://quant.stackexchange.com/questions/18674/how-to-optimize-return-in-a-moving-average-crossover-algorithm)
[8](https://quant.stackexchange.com/questions/29574/is-this-a-viable-method-for-testing-market-making-strategies "Question score (upvotes - downvotes)")
[Is this a viable method for testing market making strategies?](https://quant.stackexchange.com/questions/29574/is-this-a-viable-method-for-testing-market-making-strategies)
[2](https://quant.stackexchange.com/questions/40069/r-optimize-timeseries-to-minimize-integral "Question score (upvotes - downvotes)")
[R: optimize timeseries to minimize "integral"](https://quant.stackexchange.com/questions/40069/r-optimize-timeseries-to-minimize-integral)
[1](https://quant.stackexchange.com/questions/45954/how-to-calculate-optimal-portfolio-using-sector-constraints-in-python "Question score (upvotes - downvotes)")
[How to calculate optimal portfolio using sector constraints in python](https://quant.stackexchange.com/questions/45954/how-to-calculate-optimal-portfolio-using-sector-constraints-in-python)
[0](https://quant.stackexchange.com/questions/68480/strategies-for-trading-on-a-forecast "Question score (upvotes - downvotes)")
[Strategies for trading on a forecast](https://quant.stackexchange.com/questions/68480/strategies-for-trading-on-a-forecast)
#### [Hot Network Questions](https://stackexchange.com/questions?tab=hot)
- [A property of the rectangular (isosceles) hyperbola](https://math.stackexchange.com/questions/5092654/a-property-of-the-rectangular-isosceles-hyperbola)
- [Why did all my surge protectors smoke when my home became ungrounded?](https://electronics.stackexchange.com/questions/754411/why-did-all-my-surge-protectors-smoke-when-my-home-became-ungrounded)
- [Handroll your own filters or use a library?](https://dsp.stackexchange.com/questions/98204/handroll-your-own-filters-or-use-a-library)
- [Why were the characters so careless when they raided Dracula's house?](https://literature.stackexchange.com/questions/29671/why-were-the-characters-so-careless-when-they-raided-draculas-house)
- [Using size of encrypted content to guess corresponding plaintext](https://crypto.stackexchange.com/questions/117732/using-size-of-encrypted-content-to-guess-corresponding-plaintext)
- [How to fast-illuminate, slow-extinguish an LED in a high-side PNP switch circuit?](https://electronics.stackexchange.com/questions/754471/how-to-fast-illuminate-slow-extinguish-an-led-in-a-high-side-pnp-switch-circuit)
- [In the Pelinore setting, what does the 'Fr' class abbreviation mean?](https://rpg.stackexchange.com/questions/216408/in-the-pelinore-setting-what-does-the-fr-class-abbreviation-mean)
- [What happens when ambassadors are summoned by the foreign ministry of their host country?](https://politics.stackexchange.com/questions/93401/what-happens-when-ambassadors-are-summoned-by-the-foreign-ministry-of-their-host)
- [Another binomial identity](https://mathoverflow.net/questions/499614/another-binomial-identity)
- [Is it true according to Carnap that a turnip is not a number?](https://philosophy.stackexchange.com/questions/129985/is-it-true-according-to-carnap-that-a-turnip-is-not-a-number)
- [Conflict between cleveref, aliascnt, and amsmath](https://tex.stackexchange.com/questions/750261/conflict-between-cleveref-aliascnt-and-amsmath)
- [Is Micah 7:5 meant to be taken literally about trusting no one?](https://hermeneutics.stackexchange.com/questions/107872/is-micah-75-meant-to-be-taken-literally-about-trusting-no-one)
- [Where can I find the parts files for the shell pieces of the Lego Chima flywheels?](https://bricks.stackexchange.com/questions/19215/where-can-i-find-the-parts-files-for-the-shell-pieces-of-the-lego-chima-flywheel)
- [Why do winding numbers replace two-chains in the proof of Cauchy's theorem?](https://mathoverflow.net/questions/499587/why-do-winding-numbers-replace-two-chains-in-the-proof-of-cauchys-theorem)
- [Is it common for the Head of school to meet with PhD student who reported research misconduct and the supervisor who committed the misconduct to talk?](https://academia.stackexchange.com/questions/221046/is-it-common-for-the-head-of-school-to-meet-with-phd-student-who-reported-resear)
- [What is the complete list of values of -keypbe in OpenSSL?](https://security.stackexchange.com/questions/281986/what-is-the-complete-list-of-values-of-keypbe-in-openssl)
- [Project Euler \#909: L-Expressions I](https://codereview.stackexchange.com/questions/297979/project-euler-909-l-expressions-i)
- [What happens if there is long-lasting martial law such that enough MPs die and a quorum is impossible?](https://politics.stackexchange.com/questions/93420/what-happens-if-there-is-long-lasting-martial-law-such-that-enough-mps-die-and-a)
- [Ok to solder copper pipe that's close to black gas pipe](https://diy.stackexchange.com/questions/322683/ok-to-solder-copper-pipe-thats-close-to-black-gas-pipe)
- [Looking for a single noun to describe an ugly looking person or, more broadly, an ugly image](https://english.stackexchange.com/questions/632876/looking-for-a-single-noun-to-describe-an-ugly-looking-person-or-more-broadly-a)
- [How does a wife bring blessing to a home? Understanding the derasha of Yevamot 62b](https://judaism.stackexchange.com/questions/151215/how-does-a-wife-bring-blessing-to-a-home-understanding-the-derasha-of-yevamot-6)
- [How do ordinals manage to descend finitely?](https://math.stackexchange.com/questions/5092250/how-do-ordinals-manage-to-descend-finitely)
- [tabularray's template of acro unusable](https://tex.stackexchange.com/questions/750274/tabularrays-template-of-acro-unusable)
- [Reverse engineering images from old Japanese videogame](https://reverseengineering.stackexchange.com/questions/33519/reverse-engineering-images-from-old-japanese-videogame)
[more hot questions](https://quant.stackexchange.com/questions/59557/optimize-bollinger-bands-strategy)
[Question feed](https://quant.stackexchange.com/feeds/question/59557 "Feed of this question and its answers")
# Subscribe to RSS
Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

default
##### [Quantitative Finance](https://quant.stackexchange.com/)
- [Tour](https://quant.stackexchange.com/tour)
- [Help](https://quant.stackexchange.com/help)
- [Chat](https://chat.stackexchange.com/?tab=all&sort=active)
- [Contact](https://quant.stackexchange.com/contact)
- [Feedback](https://quant.meta.stackexchange.com/)
##### [Company](https://stackoverflow.co/)
- [Stack Overflow](https://stackoverflow.com/)
- [Teams](https://stackoverflow.co/teams/)
- [Advertising](https://stackoverflow.co/advertising/)
- [Talent](https://stackoverflow.co/advertising/employer-branding/)
- [About](https://stackoverflow.co/)
- [Press](https://stackoverflow.co/company/press/)
- [Legal](https://stackoverflow.com/legal)
- [Privacy Policy](https://stackoverflow.com/legal/privacy-policy)
- [Terms of Service](https://stackoverflow.com/legal/terms-of-service/public)
- Cookie Settings
- [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy)
##### [Stack Exchange Network](https://stackexchange.com/)
- [Technology](https://stackexchange.com/sites#technology)
- [Culture & recreation](https://stackexchange.com/sites#culturerecreation)
- [Life & arts](https://stackexchange.com/sites#lifearts)
- [Science](https://stackexchange.com/sites#science)
- [Professional](https://stackexchange.com/sites#professional)
- [Business](https://stackexchange.com/sites#business)
- [API](https://api.stackexchange.com/)
- [Data](https://data.stackexchange.com/)
- [Blog](https://stackoverflow.blog/?blb=1)
- [Facebook](https://www.facebook.com/officialstackoverflow/)
- [Twitter](https://twitter.com/stackoverflow)
- [LinkedIn](https://linkedin.com/company/stack-overflow)
- [Instagram](https://www.instagram.com/thestackoverflow)
Site design / logo Β© 2025 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing) . rev 2025.8.27.33312 |
| Readable Markdown | null |
| Shard | 18 (laksa) |
| Root Hash | 8045678284012640218 |
| Unparsed URL | com,stackexchange!quant,/questions/59557/optimize-bollinger-bands-strategy s443 |