Skip to content

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

Open
Lucioric2000 wants to merge 3 commits intowhite07S:mainfrom
Lucioric2000:feature/plots-and-new-tests
Open

Added a test for Yahoo finance data in 'Head and shoulder' conformation#7
Lucioric2000 wants to merge 3 commits intowhite07S:mainfrom
Lucioric2000:feature/plots-and-new-tests

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

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