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

Added a test for Yahoo finance data in 'Head and shoulder' conformation #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Lucioric2000
Copy link

No description provided.

Created a function to predict all the pattern types
The test pass for all bot triple tops, triple bottoms and descending triangles
start_date = dt.datetime.fromisoformat('2023-05-04T02:51:56.734028')
end_date = dt.datetime.fromisoformat('2023-05-04T04:51:56.734028')

gold_data = yf.download("TSLA", start=start_date, end=end_date, interval="15m")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the name of variable is correct and also cross verify if the start and end params are working

df_triple_top = generate_sample_df_with_pattern("Triple Top")
df_triple_bottom = generate_sample_df_with_pattern("Triple Bottom")

plot_patterns(df_head_shoulder)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do let me know if you are working on improving the plotting function based on detection rather than just plotting the candlesticks

@@ -70,14 +71,25 @@ def detect_triangle_pattern(df, window=3):
df.loc[mask_desc, 'triangle_pattern'] = 'Descending Triangle'
return df

def trend_function(x):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Making it more readable

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

Successfully merging this pull request may close these issues.

3 participants