Skip to content

34 sprint 2 market analytic metrics#80

Merged
BytecodeBrewer merged 12 commits into
developfrom
34-sprint-2-market-analytic-metrics
Jul 11, 2026
Merged

34 sprint 2 market analytic metrics#80
BytecodeBrewer merged 12 commits into
developfrom
34-sprint-2-market-analytic-metrics

Conversation

@Med-Yassine-B

@Med-Yassine-B Med-Yassine-B commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

What changed?

  • added new trend metrics
  • added cumulative return
  • strongest/Weakest day
  • volatility

Related issue

Closes #34

Tests

  • I ran pytest
  • Existing tests pass
  • I added or updated tests where necessary
  • Not needed because this only affects documentation or repository setup

Checklist

  • The change is focused
  • No secrets or API keys are included
  • Documentation was updated if needed
  • CI is expected to pass

Notes

@BytecodeBrewer

  • I had a hard time figuring the return type and the required parameters for every functions just from the description in the issue and the docs and even still not sure if i did them right
  • I suggest this type of informations to be included in the docs so contributors know exactly what to work on

@Med-Yassine-B Med-Yassine-B force-pushed the 34-sprint-2-market-analytic-metrics branch from b4506f5 to 1c967c1 Compare July 9, 2026 13:23
@BytecodeBrewer

Copy link
Copy Markdown
Owner

@Med-Yassine-B I see the issue. I think we should make the domain logic a bit clearer in the docs later, because this part can be confusing at first.

For this change, the idea is actually pretty small:

Please look at how the "yfinance" client works on the "develop" branch. The important part is that the provider/client should not return a raw "DataFrame" directly anymore.

Instead, the "DataFrame" should be placed into the domain model response.

So the flow should be:

provider response / DataFrame
→ normalize into our internal format
→ put the bars DataFrame into the bars field
→ return the full MarketDataResponse object

In other words, please import the domain models and return a "MarketDataResponse", where the normalized price data is stored in "bars".

I could refactor it myself, but I think it would be better if you try to adjust it based on the existing "yfinance" implementation. That way the structure becomes clearer and future changes will be easier for you as well. Cuz I can tell you that with the next sprint I gonna work with decorators and generators and I hope you know hiw to work with them. ^^'

@Med-Yassine-B Med-Yassine-B force-pushed the 34-sprint-2-market-analytic-metrics branch from 1c967c1 to 9897c86 Compare July 11, 2026 15:13

@BytecodeBrewer BytecodeBrewer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Alright! I think that is ok. The service can just give a dataframe instead of the whole MarketDataResponse class.

@BytecodeBrewer BytecodeBrewer merged commit 363be5a into develop Jul 11, 2026
3 checks passed
@Med-Yassine-B

Copy link
Copy Markdown
Collaborator Author

@BytecodeBrewer
i tried following the other metrics so anyone using them later wont get confused between passing a DataFrame or the whole Request, and i think moving to the new Method (MarketDataRequest) require it's own issue because other metrics have to follow the same approach

Thanks for the merge !

@BytecodeBrewer

Copy link
Copy Markdown
Owner

@Med-Yassine-B Well, I think it’s fine how it looks right now. The new service for trend analysis will just pass the dataframe and for that we need a new ticket

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.

2 participants