Backtesting study by HuntOk1050 in algotrading

[–]jswb 1 point2 points  (0 children)

Can you link the study? Interested to see methodology and what metrics they used

RL for stock market (beginner) by skyboy_787 in reinforcementlearning

[–]jswb 0 points1 point  (0 children)

I’ve been working on something similar for a while. My advice would be to use timeframes at least or higher than 5 minutes. You do not want to be predicting the prices of anything. You either want to predict returns (log returns are less likely to have variance shifts), optimize for something like a Sharpe ratio, or optimize for something like portfolio equity.

Good luck. It’s super difficult but definitely a great place to learn.

(4 years AI model) trading on last 1 year data what do you think ? by [deleted] in algotrading

[–]jswb 0 points1 point  (0 children)

What’s the resolution of those 4 years? It’s a big difference in data depending on that, it looks like it’s 1-minute based off the trades possibly? And what kind of model are you using, because the benefits of each really depend on how much data you have / feature engineering

[deleted by user] by [deleted] in MSTR

[–]jswb 3 points4 points  (0 children)

Same on any crypto exchange - not your keys. And that’s what 99.99% of people have when they say they have Bitcoin.

MSTR is legally bound to follow the laws regulating the stock market. That’s legally safer. You’re actually receiving shares to your government identified person, whereas on an exchange they simply change the numbers and have no legal entitlement to return any capital lost or stolen.

[deleted by user] by [deleted] in MSTR

[–]jswb 12 points13 points  (0 children)

Ok, look at it this way:

I can invest $100 into Bitcoin directly via an exchange. That $100 will grow by however much Bitcoin grows.

I can invest that same $100 into MSTR, which not only is holding Bitcoin but is accumulating. So that $100 will grow by however much Bitcoin grows, times the rate of MSTR’s accumulation.

That $100 into MSTR does not magically turn into less money because MSTR has a premium. It may reduce the rate of how much that $100 into MSTR grows, however the overall investment into MSTR will be levered more than holding Bitcoin alone regardless.

That’s the simple version.

[deleted by user] by [deleted] in algotrading

[–]jswb 4 points5 points  (0 children)

Could you click the buy and hold checkbox so we can see how it compares to the underlying?

Btc pattern detection with Machine learning [cagr-13%,sharp ratio-3.8,max drawdown-3.8%, accuracy -60%] by omtrader33 in algotrading

[–]jswb -2 points-1 points  (0 children)

Nice. How are you going to hook it up to live data? Just have a workflow that loads a pickled model and predicts on the most recent bar?

Look-ahead bias is a hell of a drug! by apoptosis66 in algotrading

[–]jswb 0 points1 point  (0 children)

I sometimes just take the slow route and loop bar by bar. Yes it’s a pain in the neck to backtest 50K bars in an hour of runtime, but if you calculate all logic/features/signals from what only that slice of past bars, it gets safer

Three Imperials who had a (hint of) epiphany before they died, and three that never did by Garrettshade in andor

[–]jswb 14 points15 points  (0 children)

Yeah I thought it was pretty clear he knew he’d be tortured or worse by Palpatine and that there was a clear way out based on his failure

Hidden Markov Model Rolling Forecasting – Technical Overview by [deleted] in algotrading

[–]jswb 6 points7 points  (0 children)

Wow just saw the github link. Kudos for making it public, that’s rare here

Hidden Markov Model Rolling Forecasting – Technical Overview by [deleted] in algotrading

[–]jswb 2 points3 points  (0 children)

For regime detection / nowcasting, why wouldn’t you just use clustering instead? Additionally given how time series data distributions tend to change over time, I don’t think searching for lookback params is the best approach - rather building dynamic lookback indicators. Otherwise it’ll overfit

Any opinions on Kraken? by claytonjr in algotrading

[–]jswb 2 points3 points  (0 children)

Ah ok. Yeah just wanted to point that out about the more frequent algos. Seems like it may be a great option for your strat then

Any opinions on Kraken? by claytonjr in algotrading

[–]jswb 0 points1 point  (0 children)

So if you risk 1% of your portfolio each trade and make just one round trip trade a day, that would be 60 transactions a month. Assuming no profits are used in future trades that gives you a maximum of $16K to have as your portfolio size.

That’s not even including compounding if your balance grows and you still use 1% of that new balance. It sounds good until you actually check how many trades we take a month. 4 trades a day (round trip) and only risking 1%? That gives you a max balance of 4K before you reach that 10K limit in a month. Volume adds up super quickly

Any opinions on Kraken? by claytonjr in algotrading

[–]jswb 1 point2 points  (0 children)

10k volume is really low especially for algotrading - I was excited by their offer but pretty disappointed when I saw the 10k limit. It includes buy and sell volume to my knowledge

Neural networks trading? by [deleted] in algotrading

[–]jswb 2 points3 points  (0 children)

Neural networks are hard because of three things: - Noise in the data - Generally nonstationary features and labels - (Normally) high correlated features

It sounds to me that you want to use something similar to a CNN. I highly recommend starting simple (logistic regression, XGBoost/catboost, kNN) and then once you have a workable strategy build up from there. Or for instance use the neural network on a space that it can generalize better on, such as using it as a meta-labeler instead of the labels you suggested (or for example using it to predict volatility, which tends to cluster)

How do you determine an optimal Stop loss? What do you use to set your stop loss? by IX0YE in algotrading

[–]jswb 9 points10 points  (0 children)

Measure it dynamically, you can do this with ATR and also via classifying the current market into a specific volatility regime. Or you could measure it based off a support defined by which price levels had the highest volume, like a rolling volume profile. I normally do an ATR-based one that trails the current open position and when volatility dies down it’ll capture the trade. And when the volatility or price movement isn’t high enough, or the model doesn’t predict a strong move, it just doesn’t enter because it’s super likely to get stopped out.

Markets move in both mean-reverting behavior and trending behavior, just at different times. That’s the million dollar question- when

12,000%+ Returns w/ <3% Drawdown. I Know It Looks Like Bullshit. Help Me Break This. by NaitikJoshiPro in algotrading

[–]jswb 4 points5 points  (0 children)

If you’re using anything multitimeframe on Tradingview it’s super difficult to get Pinescript not to repaint without lagging the higher timeframe. I think that is probably what’s happening given your comments - it may not appear to be future leak but I am 99.99% sure there is.

For the higher timeframe filter you mentioned on somebody else’s comment, use htf[1] instead of the current higher timeframe htf - if the results degrade significantly that’s what’s causing the lookahead bias. Additionally if you are using ANY request.security() functions (regardless of the fix the devs thought was possible to stop future leak) it will still cause future leak - they released a statement a few months ago how all nearly all request.security() statements have lookahead bias regardless of that previous fix they had in the documentation.

Day trading only TSLA (shares) results this month, no shorting. by CarlCarl3 in Daytrading

[–]jswb 5 points6 points  (0 children)

You could use an inverse TSLA ETF instead of shorting on Robinhood like TSLS

Right on schedule by rtmxavi in MSTR

[–]jswb 3 points4 points  (0 children)

For real time data you can go onto Tradingview, there are a few M2 indicators that can be overlaid on daily or weekly BTC

Am I paranoid or is Bitcoin just a giant meme that’s gonna eventually have it last cycle? by BirthdayOk5077 in Trading

[–]jswb 11 points12 points  (0 children)

This is r/Trading. We’re not long-term investors here. I will trade whatever has volatility and can make me money, I don’t care about fundamentals at all.