-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactor #296
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #296 +/- ##
==========================================
- Coverage 47.38% 41.62% -5.77%
==========================================
Files 26 26
Lines 4153 3825 -328
==========================================
- Hits 1968 1592 -376
- Misses 2185 2233 +48
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,2 @@ | |||
[settings] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubber 🖃
def fetch_chain_data(self, symbol: str, date: Union[str, dt.datetime]) -> pd.DataFrame: | ||
price = self.fetch_price_history(symbol, self.poll_interval)[symbol].iloc[-1]["close"] / 100 | ||
|
||
# Types = call, put |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove?
|
||
# Create a permutation of all the data | ||
data = [] | ||
for t in types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
I'd import itertools
for type, strike, expiration in itertools.product(types, strikes, expirations):
data.append([symbol, expiration, type, strike])
# Store the price change since the first price | ||
self.randomness[symbol] = returns.cumsum() | ||
self.randomness[symbol + "_rng"] = rng | ||
|
||
# The inital price is arbitarly calculated from the first change in price | ||
# The initial price is arbitrarily calculated from the first change in price |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
debugger.error(self.installation()) | ||
raise e | ||
# try: | ||
# exec(f"import {dep}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm?
pyyaml == 5.3 | ||
tqdm == 4.66.4 | ||
tzlocal == 5.2 | ||
tzdata == 2024.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will make it difficult for others to use this module. mb >= rather than == for the more general modules like pandas
# for key in broker.req_keys: | ||
# self.assertTrue(key in results) | ||
# self.assertEqual(results[key], "y") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
No description provided.