Vladimir has shared some great filter implementations (eg: thread 1, thread 2) that inspired me to tinker with them a bit. As can be expected, it seems that Kalman, Laguerre and EMAs show favorable results when combined for trend entry/exit signals. I’ve attached a simple algorithm that trades Crypto (or any ‘trendy’ asset), using crossovers between the three. It borrows from Vladimir’s original code but it has been refactored so the logic can more readily evolve.
In the algorithm you’ll note I’m using something called a SmartRollingWindow —this is a simple utility I whipped up to more easily check for indicator crossovers and falling/rising/flat values. I hope people find it useful.
As for the strategy itself, I’d love to hear suggestions from the community on how to make it more tradable for liquid Crypto (BTC, ETH, etc). Specifically:
- How might you adjust the filters? What would you change?
- What regime filter would you use? Long-term MA? ADX?
- How would you manage money? Volatility-based sizing?
- How might you improve the exits? Trailing stops?
Thanks in advance.
PS:
- Vladimir : I took your Kalman filter logic and turned it into an indicator. It seems to work fine, but please take a look to make sure it still performs as expected.
- Tagging you, Simone Pantaleoni, as I believe you're exploring similar use of for crypto trends
Vladimir
ekz,
Great codding, congratulation.
Yesterday we published "Trading Kalman Filter" - the very simple version with only one indicator. and only one parameter which was not optimized yet.
Compounding Annual Return - 237.024%Drawdown - 38.500%The ratio of the annual return to the maximum drawdown is 6.16.
Compare to yours, with 3 indicator and 3 parameterCompounding Annual Return - 281.711%Drawdown - 50.300%The ratio of the annual return to the maximum drawdown is 5.60 and less than in our simple version.
In our practice, to compare algorithms, we use the ratio of the annual return to the maximum drawdown as the first metric, because we can normalize the return to the accepted maximum drawdown by simply reducing the exposure.
We usually start creating trading algorithm with the simplest version and then adding indicators and parameters one at the time only if they improve risk metrics of our choice.
Best Regards,
Vladimir
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Mak K INVESTOR
Hi ekz,
Very cool algo, good job. The returns are amazing but the downside risk very heavy, why don't you sacrafice some of that return to hedge your position?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Hi Vladimir! Thanks for the reply and the kind words. CAR/DD ratio is a good metric to use for sure. I factor it into my algo performance criteria as well and I agree this is not tradable as is. As you rightly pointed out, for some assets using Laguerre and EMA crossing Kalman is less performant than your original version that just looks at price crossing Kalman. The fun is only just beginning, to research even better performance across the board.
On a related note: do you know how to modify the gain of the Kalman filter in Pykalman? I'd like to attempt Kalman-vs-Kalman crossovers, with more responsive vs less responsive, but to do so I need to modify the gain and I dont know how to do so with this library.
Mak K : Thanks a lot and, agreed! What are the different ways you would consider hedging positions in such a system? Would love to hear thoughts.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Here’s my updated version, with Ret/DD at 9.69
Changes:
Note: I am already doing this but noticed others might not be: setting an explicit brokerage model (instead of the default) also impacts performance. I'm using Bitfinex, where I plan to go live, and perf is significantly better.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
.ekz.
--> I'd like to attempt Kalman-vs-Kalman crossovers
There are thousands of ways to apply the Kalman filter to trading algorithms, from estimating the next bar's prices and the standard deviation of prices, to generating signals based on forecast errors and dynamically calculating hedge ratios.
A couple of years ago, we created over a hundred Kalman Filters applications on Quantopian that have not yet been ported to QuantConnect.
We'll see if the one you are looking for is there.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
Here is slightly modified “Simone Pantaleoni btcusd kalman-mom strategy”
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Spacetime
Interesting share indeed. I have ran this with ETHUSD and the results are attached. Looks like it is giving better returns. (.ekz latest version from above)
Would be nice if we can test it out with leveraged crypto futures or crypto options (maybe use it as hedging of some sort).
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
ekz.
-> Vladimir :
for the Kalman filter, how come you have such a long warmup period?
IE: Why 5 * Period? What is the significance of the constant '5'?
From digital signal processing point, Kalman filter is adaptive infinite response filter (IIR).
Current value of any IIR substantially depends of starting value of time series.
In our practice we usually use 5 times more data points to warn up any IIR to mature.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Great to see the discussion picking up!
spacetime: Awesome that you are trying this on other cryptos. That's the idea. I’ve also tried it on ETH and SOL, and I feel the drawdown can be mitigated more.
Vladimir : Good insights. It makes sense then, that the period will influence the response filter performance. Also, thanks for the version that factors in momentum. I will play around with it, but I admit i am wary of the introduction of multiple parameters that are related to time periods (eg:lookbacks). From what I’ve learned about Kalman, a core part of its value is the fact that it adapts effectively, with much less dependency on lookback compared to, say, moving averages.On a related note, Vladimir, your current entry condition (price is above kalman) unfortunately leads to overtrading, because even though you are already invested it will sell and re-buy. This leads to about 443 trades. Adding the condition if (not self.Portfolio.Invested ) reduces this to 81 trades with slightly better performance, and a savings on transaction fees.
Trading a Crypto portfolio:
For anyone else looking to tinker with this: something to keep in mind as a ‘guiding principle’: Ideally we should able to trade this system with a portfolio of cryptos —imagine daily scanning for whichever security meets the entry criteria, and when we have several, holding them with equal weight (or some factor-based weight). In that case, we’d want a generalized system that is NOT fit to one particular security. This is why I’m hesitant to add new time based parameters because they are likely to have different requirements (e.g. the favorable momentum period of SOL will be different from that of ETH, ADA, or BTC).
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Updated Exits With Dual Kalmans Crossing: To reduce drawdown, I investigated other exits (other than price crossing below the Kalman --this happens quite late), and was able to test a responsive Kalman crossing below a less-responsive Kalman. I was able to increase the responsiveness by updating the transition_covariance property (higher value makes it more responsive and follow price more closely). It seems to work alright, squeezing out a better CAR/DD for BTC (298% / 29% = 10.3 ), but not so well for ETH and SOL --also, the optimized values are quite different for different securities which, as mentioned, is not ideal…
Also, because this exit signal tends to fire early sometimes, I updated the entry signal to match vladimirs, so we jump back in the trades whenever price is above the original Kalman (previously i was only entering when price *crosses* over the Kalman.
All that said, it's still worth sharing. See the attached backtest.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Guy Fleury
A small observation.
The entry and exit method 3 is the only one being executed. Methods 1, 2, and 4 do not happen.
Method 1 and 2 happen after method 3 has triggered a trade. While method 4 is never reached nor executed.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Hi Guy Fleury , great to see you chiming in!
You are correct. I parameterized entries and exits to easily test different mechanisms. Only one entry (and only one exit) method can be used at a time.
As of my last version, here are what the methods correspond to:
Entries:
Exit
Right now, My preferred Entry/Exit pair is Entry #3 + Exit #3, as they seem to be the most consistent across securities, and require fewest total # of parameters.
Hope this helps.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Guy Fleury
.ekz.
On your latest version above, all entries are done on method 4 while all exits are done on method 5.
Is there a reason why most of your trades occur at 20:00:00 and some at 19:00:00?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Guy Fleury Again you are correct.
In my last attached backtest, I was testing entry method 4 and exit method 5. I described this in the body of the message/post. Ultimately i still believe entry #3 and exit #3 are more suited for trading multiple securities.
Not sure why some of the trades occur at 20:00 and some at 19:00. It might have to do with the way Lean consolidates the data, perhaps. Good catch, though. It might be worth investigating.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
In case it's not obvious to others: i am using externalized parameters, and you can see them in the left pane of the IDE.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Guy Fleury
.ekz.
In your strategy, you have 5 trade triggers for entries and 5 for exits. The order in which they are placed can determine which will be executed first since only the first one reached of each group can be executed at any one time, as you said. You can also force which one will be executed which is what is being done here.
Theoretically, over the same lookback period, the Kalman filter is more responsive to price movements than the EMA signal which is more responsive than the Laguerre signal which in turn is more responsive than the SMA signal. If you test for the price to cross the fast Kalman filter first, the other cross-overs will not even be tested, and, therefore totally redundant. Price precedes them all.
In Vladimir's version, method 2 (Laguerre crosses Kalman) is the more productive method. The same goes for your version. However, your method 5 does outperform them all.
In this strategy using the Kalman filter as a cross-over system you simply have a variation of the old EMA cross-over trading strategy. It becomes something like finding the best lookback period for an EMA cross-over on some past market data. This might also raise a curve-fitting flag. That lookback period might not hold or be the best going forward.
Bitcoin is, let's say, volatile. It can swing 20% in a day (it has done so a few times). Any fixed lookback period could be costly. Maybe something even more adaptive might be needed, but then again, you would be back with the EMA cross-over thing. Almost suggesting that maybe minute data should be investigated next.
The strategy has no fundamental data support. The reason is simple: none is available. There is no formula that can say this is how much Bitcoin is worth. We cannot say either that Bitcoin is over-priced or under-priced at any given time. Nor can we forecast a future value within any confidence interval. You can only rely on lagging technical indicators for trading decisions as was done in your trading script. On the other hand, we could just say it is going up until it doesn't which would put you back at the right edge of the chart.
The big question is: does the price preannounce where it is going or do we just trail behind to wherever it wants to go?
I found the CAGR to be impressive. Good work.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Fred Painchaud
Hi .ekz.,
You could also investigate variable lookback periods based on volatility (such as ATR). When volatility is higher, lookback is lower. And vice versa. It gives you faster response when needed (in big swings which normally come with greater volatility) and better statistical significance when needed (sideways market - flatter volatility).
Such as done within Dynamic Momentum Index, for instance.
Fred
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Guy and Fred, thanks for the feedback!
Guy Fleury (on evaluating the system):
Love the breakdown, and appreciate the detail you put in your response. You raise a very good point, too, and I landed at the same conclusion (that Vladimir highlighted to his credit): Price is the most responsive to price (ha), and so using this as a crossover signal will beat them all.
Also, you said it correctly about the Kalman crossovers, we definitely run into the problem again, with subjective parameters. because not all securities created equal... if only there was some way to normalize the lookback/parameterization... :)
Fred Painchaud (on dynamic lookbacks):
... which brings me to your point, Fred. This sounds like a good idea! Adjusting the responsiveness based on volatility, similar to how the Kaufman adaptive moving average adapts based on market efficiency (different from volatility, but comparable). With some adjustments, we may be able to get the appropriate responsiveness for the corresponding market voaltility (or market noise), regardless of the security. If trading on the daily, perhaps we will want to look at the volatility/noise on a lower time frame --perhaps the 4 hour. I will think about this and see how best to apply the logic. If you have any examples of this in practice, or any additional guidance, please share!
Everyone (on 'Strategy' vs Testbed):
Everyone, one thing to note: the backtest i've shared isnt exactly a 'strategy' as is. It's more of a strategy testbed. This is why you see multiple interchangeable entry and exit methods in there --it's easier to test and compare them against each other (using the optimizer). Typically, once I've tested and determined the ideal entry/exit method, i remove the others. I will probably remove the non-preferred ones soon, but I may want to try one or two more things first.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Guy Fleury
.ekz.
Here are the test results of both versions (yours and Vladimir's) when forcing the program to only execute each method in turn.
The first 4 methods gave identical results. The second method was the most productive (Laguerre crossed above/below Kalman). This is a slightly delayed crossover when compared to using price. It was like shifting a position slightly forward in time.
As can be observed, your method 5 did even better.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Fred Painchaud
Hey .ekz.,
Glad you liked the idea. It's really as old as mathematics.
An easy way to dynamically compute periods is to take one measure of volatility and divide a chosen "mid-period", adequate for the metric at hands to “dynamize”, by it. When your measure of volatility is greater than 1 (rising), your “mid-period” decreases. And vice-versa. Like pretty much every metric on y-half-bounded series like price action and volume, your measure of volatility will in theory be able to go as down as 0 and, however, won't have, in theory again, an upper limit. So you'll need to clip the resulting ratio ("mid-period"/volatility), or else, you'll end up with potentially a division by zero (and very very high resulting ratios when volatility is close to 0) and then also potentially very very low resulting ratios when volatility gets very high (the limit calculus being 0).
So, in a nutshell:
Volatility:
Mid-period rebase:
That's it. Well, that's one easy easy way.
Many normalize (read, rescale between 0 and 1 here - as normalization means quite a few things) volatility, usually with artificial stochastics based on running minimums and maximums (stochastics don't apply to samples. but anyway), and then multiply by the mid-period…
Electrical engineers would yet tackle the problem differently. Etc.
Enjoy!
Fred
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Guy Fleury : Thanks! To be fair, Vladimir's version is the winning one: his original code uses price above/below kalman, and doesn't have the multiple methods. I built on his code and added multiple methods, including the Laguerre-Kalman crossover. Thanks for sharing these screenshots. I also ran comparisons of them all, using the Optimizer (and incrementing method # to 1,2,3,4,etc). Curious, which assets are you trading in these backtests, and over what time period? Please attach the winning backtest when you have a moment.
Fred Painchaud : Love this. Very informative and will help as I try this out. Not surprisingly, the KAMA indicators uses something similar. It uses the Kaufman efficiency ratio for the noise measurement, and also takes a floor period and ceiling period. It uses market noise though, and I think volatility** might be a better modifier for what we are trying to do here. I will share my results when done!
__________________
**Something I learned recently: Market Volatility ≠ Market noise. Sharing this link for the sake of others.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Fred Painchaud
Yup. Short addition. TL;DR. Noise is specific to a signal/system. It's unwanted signal (disruptions) generally closely around main/wanted signal. Well, if noise is 1) frequent and 2) powerful wrt main, then, you have a problem getting ("hearing" so to speak) your main signal, you loose it in the noise, you can't filter it out. Enter signal-to-noise ratio. In trading terms, noise is retracements and big money checks, for instance. Volatility is another thing indeed. It's a rate, just like acceleration (rate of velocity change over time). It's the rate of price change over time. If you use noise to dynamize a lookback, you might end up biting to big money checks. Except maybe if you weight noise with volume. Volume will most likely attenuate noise created by checks enough so you don't signal trades. But I don't think I would bother. Well, my current opinion…
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Vladimir
.ekz.
Here is my solution how to calculate volatility-adaptive self.kalPeriod.
You've probably seen it in my thread Intersection of ROC comparison using OUT_DAY approach.
self.history = self.History(self.ticker, self.VolatilityPeriod, Resolution.Daily)
vola = self.history[self.ticker].pct_change().std() * np.sqrt(252)
self.kalPeriod = int ((1.0 - vola) * self.kalBasePeriod)
I'm sure you know how to find the best combination of self.kalBasePeriod and self.VolatilityPeriod.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
These are good analogies, especially how volatility is a rate. Simple and true.
Not sure I am following what you meant by this line though: If you use noise to dynamize a lookback, you might end up biting to big money checks. “Biting to big money checks” … is this a good thing?
Also, weighting noise with volume sounds interesting. Would the goal be to determine whether the noise is ‘real’ noise? If there is low volume vs high volume?
So as to keep this thread on-topic, we can continue this sidebar topic via chat. Are you on the Quantconnect slack or discord? I'm in both, with the same name: ‘ekz’.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Vladimir: Thanks for this. I will give this a try ASAP.
Very much appreciated!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Guy Fleury
.ekz.
The only changes made to your version were the start and end dates.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Carsten
.ekz. valdimir
I'm trying to build a black swan hedge, running in parallel with a kind of In-Out strategy.
The idea ist to profit from the VIX spikes. If one buy very far out of the money call, like 100 Vix, they start to spike like crazy, 200-400 times the purchase price!!, please see the the link for the code.
To decide on the liquidation, I used a classic MACD, as well a MACD with a Kalman filter, like the examples in this post.
Everything much too slow response, some suggestions? Thankx
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nitay Rabinovich
.ekz. First of all - Thanks for the contribution! really nice algorithm structure and I really liked the SmartRollingWindow class.
I've been playing around with taking this structure and trying to apply other indicators to it, most of them didn't come close to the performance seen here, but when I applied a rather simple EMA crossover with ETH I actually achieved a nice reduction in drawdown while maintaining the PSR and returns,
I wonder if I'm missing something in my code, or is this a valid crossover approach using simpler indicators
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Nitay Rabinovich: That looks great! Sometimes the simplest things work best :) It's been long suggested that 'old-school' trading strategies work great for crypto since it's a fairly nascent and inefficient market, so I'm not surprised the simple EMAs work well! Might be a good idea to try the logic in a crypto universe and see how it works. Vladimir & Fred Painchaud: I switched into holiday mode so I've been quiet, but I played around with the volatility-adjusted period in isolation and didn't see much success, unfortunately. I saw better results across assets using ATR based dynamic stops that I'm more familiar with (a multiplier of the recent ATR). Will share a universe crypto trend follower soon. I might just use a EMA version like the one Nitay Rabinovich shared.
Carsten: I played around with black swan hedges using SPY puts. Haven't tried VIX hedges, but I've heard they're generally more successful. Good luck!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nitay Rabinovich
.ekz. - Happy holidays!
I actually wanted to test if this EMA approach is only fitted to ETHUSD, so I modified the code to fit multiple assets, I manually set BNB, ETH, and SOL. And I set the benchmark to BTC (which is… questionable I guess?)
Maybe it would perform even better with dynamic universe selection, but overall seems like the concept works well with multiple assets as well, I did see some issues with orders so I think placing orders needs fixing.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Anton Kiselev
Nitay Rabinovich - That is awesome! Simple, very low drawdown and high PSR. IMHO using BTC as benchmark makes total sense. I have also tried to test it with other MA types, but EMA produced the best results so far. As for using a dynamic universe selection - that is great, the question is - what parameters to use in order to pick a specific crypto (volume? other factors?). I also wonder if similar approach can be used for short positions - for e.g. when slow is above fast and price is below both fast and slow.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nitay Rabinovich
Anton Kiselev - I'm really not that experienced with universe selection in general, but if I'll find the time I'll try to research some approaches to filter probably by volume, volatility, and liquidity (probably via https://www.bitcoinmarketjournal.com/token-velocity/). and there's also the question of the rebalancing period.
Regarding short-selling - it's an interesting idea that's definitely worth checking!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Good stuff Nitay Rabinovich, applying it to a basket of cryptos. I have some crypto-universe code that may be helpful --it includes volume thresholds, rebalancing logic, and a few other handy things. Will share after cleaning up a bit.
In the meantime, one thing i recommend you do for your current system, is running it with Minute resolution --doing this will give you higher precision, using bid and ask prices, and the results will be more reflective of what to expect in "real life".
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nitay Rabinovich
.ekz. - So I tried a couple of things -
1. SImply changing the resolution for all to minute data, including the consolidation handler and rolling window updating - caused way too many trades, pretty much killed the algorithm with excessive trading.
2. Tried to mitigate with consolidating on daily resolution but using minute data for the cryptos and indicators - also reduced performance massively. (tried with several different periods to see their effect, but below you can see the best case)
Still has excessive trading…
3. Lastly I changed the crypto's resolution to minute, yet kept both the indicators and the consolidation handler on a Daily resolution. And that… well created this amazing backtest.
So the question is - what's to expect in “real life" - I know for a fact I won't run an algorithm trading crypto per minute, so 1 is out of the question, but is using daily resolution for indicators and consolidation handler considered “painting a pretty picture" that only works in backtests? No matter the answer, it is a pretty backtest :)
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Nitay Rabinovich #3 is the way to go, and I'm glad it looks good!
Over the weekend I'll take a closer look to see if any bias has been introduced that may invalidate these results. I will also share the additional universe code.
Good stuff!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Hi Nitay Rabinovich, I did a more thorough walk through of your last backtest and noticed/fixed something:
TLDR:
Currently, when we look at our rolling windows for exit/entry signals, we were looking at old data (yesterday's data). Addressed this by changing where we update the rolling windows. Overall performance is impacted negatively.
Details:
In the attached backtest, I made the code change to address this. Now we are updating the rolling windows at the right time, right after indicators are updated. So at 7pm (19:00), the sequence of events is now:
Note:
I changed the name of the method from “UpdateIndicators” to “UpdateAssetWindows” to be more accurately reflect what the function is actually doing. Also, OnEndOfDay is now only used for plotting charts..
Code diffs:
https://www.diffchecker.com/O6AKaeJ9
Take-Away:
The results arent as favorable (less profit, higher drawdown), but i think this is a necessary change for more predictable behaviour. That is, unless we can rationalize why it is better to use yesterdays prices to make decisions today. Perhaps that can be part of the strategy, but it does seem that it would be arbitrary at best.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
FYI: I started a new thread for EMA crossovers, so we can keep this thread focused on Kalman filters
Nitay Rabinovich : let's continue the EMA conversation there, pls.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Vladimir : I have a follow up question up on our earlier topic, calculating volatility-adaptive lookback period. Specifically around this code:
My question: How do you determine the best combination of self.kalBasePeriod and self.VolatilityPeriod?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ariel Nechemia
Hey! I've been following the development of this strategy and have been trying to learn from all the insight that all of you have shared, super interesting!
Just a thought. From what I understand, this is a long only strategy. For the sake of robustness, would it make sense to test the strategy's performance trading in both directions? With the cycles that any asset goes through, would we be inadvertently overoptimizing the strategy by only testing a long only strategy when the crypto market has seen an incredible bull run?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Hi Ariel Nechemia, thanks for the note, and sorry for the late response.
So, going long in a bull market isn't over-optimization, it is arguably conventional wisdom. IE: it's what you do.
Similarly, systems that trade short only strategies often have a regime filter to make sure the market is in a downtrend before taking any positions. We are doing the same here --we are using these indicators to detect bullish price action, and taking long positions accordingly.
You can certainly make this bidirectional (long/short), and introduce additional conditions with the inverse logic (swap ‘<’ for ‘>’). This would effectively introduce bearish regime filters, during which you would go short.
Hope this helps!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jack Pizza
what's the point of these mental gymnastics? If you use all available data sharpe drops to a pitiful 1….. why are you over fitting by only going back to 2020?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Elsid Aliaj I'm not sure if you were speaking in jest or in sincerity, but I'll respond for the sake of others. The goal here is to engage in discussion, and knowledge share, for the sake of collective learning.
Mental exercises, or ‘gymnastics’ as you put it, facilitate a familiarity with strategy research --the kind that can help people build skills to be successful in this field. In the same way, homework and tests in school may not individually give you the experience to excel at a career, but they sharpen your thinking to prepare for the job market.
In my original post, I opened the discussion for people to offer suggestions on how to make this more tradeable. If you'd like the discussion to result in a high Sharpe, perfect strategy to weather all market regimes, then please make a contribution toward that end.
Again, I'm not sure if your comment was sincere or meant as a joke, but at worst it was offensive, and at best it was unproductive. It truly added no value.
When engaging with others here, please: add value, seek guidance, offer encouragement, or give constructive feedback. This is how communities grow for the better.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jack Pizza
Feedback was fairly straight forward in my 2 sentence response stop painting a super unrealistic picture of the strategy which goes from a sharpe of 5 to literally 1…. You literally wasted time with misleading information.
You want feedback and constructive input, yet you're being totally deceptive about the nature of the strategy by pumping it's performance 500% why? Is there a reason you chose this specific year? When you could've easily ran a full backtest and painted a realistic picture?
Like it's literally trading 101 don't overfit backtests, yet majority on here due exactly just that.
You're not doing anybody any good, besides making Quantconnect become a joke like Quantopian, right behind forex holy grail forums as far as community goes.
This isn't just mean't at you, seems majority show some super awesome highly fitted backtest, like for what? It's delving into a virtual sharpe ratio contest.
Either I guess trading communities in general are just really unsophisticated and I'm placing high hopes for them, or something is amiss. I find it hard to believe that supposedly analytical, scientific, mathematical type of people literally think like 13 year olds on forex forums, when it comes to performance, risk, black swans.
Such as the beauty of rotation strategies in / out going from stocks and bonds. like NOBODY and i mean NOBODY could've thought about the implications of what would happen when both stocks and bonds start correlating together and plunging together. I mean only an obvious genius could've seen that one coming (sarcasm).
This is literally turning into Wall Street Bets that program a bit, let's all short VIX free money.
I guess anyone doing anything meaningful here is just using the infrastructure to trade, community might as well be dead I guess.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
Elsid Aliaj, based on your rant, this conversation thread (and arguably the Quantconnect forum) probably isn't for you. Those of us that are in a different phase of our journey –amateurs that are excited to learn and share the little we know– we often benefit from targeted discussions like these.
That said, here's an example of how you could have added *real* value: “everyone, be careful not to go live with this strategy as is. It is fit to a hyper-bull market, so consider using a regime filter such as x, y, or z.”
We might have responded with: "that's a good point, Elsid. Thanks for pointing that out, here's an attached backtest with your suggestions that make it more tradeable."
Best of luck on your quest for the right community for you, but my advice is that you try leading the change you want to see. Going around complaining probably isn't the best use of your time.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Chak
Elsid Aliaj, smart rolling windows object construct works, so serves this specific thread's purpose.
The In vs Out Strategy's underlying premise is a pretty good idea. It just needed some fine tuning. Market isn't under 200 dma, hence not a bear market yet, so the In vs Out works so far. It's only when the market is glaringly below its 200 dma and the underlying alpha still suggests buying stocks is where it becomes a problem.
Alot of people from the community learned from this Black Swan event, and this won't be the last Black Swan event.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jack Pizza
Anyone trying adding shorting also? Seems might solve performance issues during bear markets? As it just tries to enter long constantly.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jack Pizza
Changing to short from a quick test didn't seem to do anything, adding an SMA Filter on top of everything and stop loss seems like it's the only thing holding up during a bear market. with 150CAGR 50% DD
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
.ekz. INVESTOR
This is great, Elsid / Jack Pizza, thanks for coming back and contributing to the conversation.
You are right; a short bias would def. be a worthwhile consideration. I'd imagine, though, that it should not be symmetrical to this long-biased logic.
In my my limited experience, i've seen that traders will still have a bullish sentiment when trading bullish assets in a bear market (bullish assets = historically up-trending). As such, the price patterns in a bear market will be different from those in a bull market (where sentiment matches the price action).
It would probably be prudent to consider additional information, like Volume (think VWMA, VWAP, RVOL) and market noise (think KER), when considering bearish signals.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!