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

Offset Sold Puts/Calls #142

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

Offset Sold Puts/Calls #142

wants to merge 40 commits into from

Conversation

pattertj
Copy link
Owner

@pattertj pattertj commented Feb 7, 2022

No description provided.

@pattertj pattertj changed the title Initial Commit Offset Sold Puts/Calls Feb 9, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented May 27, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.16%.

Quality metrics Before After Change
Complexity 4.35 ⭐ 4.39 ⭐ 0.04 👎
Method Length 60.98 ⭐ 62.36 🙂 1.38 👎
Working memory 8.36 🙂 8.79 🙂 0.43 👎
Quality 68.91% 🙂 68.75% 🙂 -0.16% 👎
Other metrics Before After Change
Lines 3596 4347 751
Changed files Quality Before Quality After Quality Change
looptrader/main.py 58.52% 🙂 45.06% 😞 -13.46% 👎
looptrader/basetypes/Broker/tdaBroker.py 65.46% 🙂 70.17% 🙂 4.71% 👍
looptrader/basetypes/Database/abstractDatabase.py 97.01% ⭐ 97.01% ⭐ 0.00%
looptrader/basetypes/Database/ormDatabase.py 69.35% 🙂 68.30% 🙂 -1.05% 👎
looptrader/basetypes/Mediator/abstractMediator.py 98.02% ⭐ 98.13% ⭐ 0.11% 👍
looptrader/basetypes/Mediator/botMediator.py 85.08% ⭐ 85.23% ⭐ 0.15% 👍
looptrader/basetypes/Mediator/reqRespTypes.py 39.75% 😞 39.75% 😞 0.00%
looptrader/basetypes/Notifier/telegramnotifier.py 80.41% ⭐ 80.24% ⭐ -0.17% 👎
looptrader/basetypes/Strategy/helpers.py 81.23% ⭐ 82.15% ⭐ 0.92% 👍
looptrader/basetypes/Strategy/singlebydeltastrategy.py 67.81% 🙂 65.33% 🙂 -2.48% 👎
looptrader/basetypes/Strategy/spreadsbydeltastrategy.py 69.28% 🙂 68.53% 🙂 -0.75% 👎
test/broker/test_tdaBroker.py % % %

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
looptrader/basetypes/Strategy/singlebydeltastrategy.py SingleByDeltaStrategy.get_best_strike_and_quantity_v2 12 🙂 148 😞 22 ⛔ 38.27% 😞 Try splitting into smaller methods. Extract out complex expressions
looptrader/basetypes/Strategy/spreadsbydeltastrategy.py SpreadsByDeltaStrategy.build_new_order 9 🙂 186 😞 11 😞 48.84% 😞 Try splitting into smaller methods. Extract out complex expressions
looptrader/basetypes/Strategy/singlebydeltastrategy.py SingleByDeltaStrategy.get_best_strike_and_quantity 9 🙂 110 🙂 15 😞 51.00% 🙂 Extract out complex expressions
looptrader/basetypes/Strategy/singlebydeltastrategy.py SingleByDeltaStrategy.place_order 8 ⭐ 170 😞 11 😞 51.19% 🙂 Try splitting into smaller methods. Extract out complex expressions
looptrader/basetypes/Strategy/singlebydeltastrategy.py SingleByDeltaStrategy.get_offsetting_strike 8 ⭐ 130 😞 13 😞 52.11% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

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.

None yet

1 participant