Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in a live environment #1

Open
sword134 opened this issue Dec 12, 2021 · 2 comments
Open

Using in a live environment #1

sword134 opened this issue Dec 12, 2021 · 2 comments

Comments

@sword134
Copy link

sword134 commented Dec 12, 2021

Hello,
I've taken a look at this repo and played around a little, I have yet to understand the exact logic/strategy behind the Caerus. However it needs to be stated that it can only identify stoppoints on the same day one is currently at. Take for example the stock TRV and parse the following parameters into Caerus:

start = '2018-01-01'
end = "2020-11-12"

stock_data= yf.download("TRV", start = start, end = end)
cs = caerus(window=50, threshold=0.5, minperc=10, nlargest=1)
cs.fit(stock_data["Adj Close"].values, verbose=3)
cs.plot()

As one can see from the plot the stoppoint (red dot) is on the latest/current day (2020-11-12), and the buy point is somewhere around late September. When adjusting the end date to around end of September it doesn't detect/plot the buy point, therefore if one had run Caerus in late September 2020 on "TRV" they would not have gotten a buy signal, only after the stoppoint has been identified will the buy point be marked. Likewise the stoppoint also moves based on the end date. If you change the end date from 2020-11-12 to for example 2020-11-08, then the stop point will move to that date.

I am therefore a bit confused as how to use Caerus in the real world if one was to use this in a trading strategy.

@bkomaki
Copy link

bkomaki commented Jan 30, 2024

Me Also have the same result, by increasing values in trend it shows a continuous turning down !
May be we need another indicator to detect long / short signals!

@erdogant
Copy link
Owner

This is correct. It is a lagging indicator. What you can do is identify the known peaks and valleys, extract the features from these points and learn a machine learning model for example.

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

No branches or pull requests

3 participants