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

Optimizer #192

Merged
merged 22 commits into from Jun 24, 2021
Merged

Optimizer #192

merged 22 commits into from Jun 24, 2021

Conversation

amor71
Copy link
Owner

@amor71 amor71 commented Jun 19, 2021

No description provided.

@amor71 amor71 linked an issue Jun 19, 2021 that may be closed by this pull request
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 23, 2021

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 6.81 ⭐ 6.79 ⭐ -0.02 👍
Method Length 79.97 🙂 80.33 🙂 0.36 👎
Working memory 10.12 😞 10.12 😞 0.00
Quality 62.18% 🙂 62.18% 🙂 0.00%
Other metrics Before After Change
Lines 1636 1658 22
Changed files Quality Before Quality After Quality Change
liualgotrader/init.py 100.00% ⭐ 100.00% ⭐ 0.00%
liualgotrader/enhanced_backtest.py 58.07% 🙂 58.04% 🙂 -0.03% 👎
liualgotrader/scanners_runner.py 69.25% 🙂 70.79% 🙂 1.54% 👍
liualgotrader/analytics/analysis.py 58.77% 🙂 59.24% 🙂 0.47% 👍
liualgotrader/common/data_loader.py 61.94% 🙂 61.94% 🙂 0.00%
liualgotrader/data/alpaca.py 73.95% 🙂 70.68% 🙂 -3.27% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
liualgotrader/common/data_loader.py SymbolData.fetch_data_timestamp 19 😞 246 ⛔ 17 ⛔ 28.32% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
liualgotrader/analytics/analysis.py symobl_trade_analytics 9 🙂 296 ⛔ 24 ⛔ 30.39% 😞 Try splitting into smaller methods. Extract out complex expressions
liualgotrader/analytics/analysis.py calc_symbol_trades_returns 20 😞 197 😞 17 ⛔ 30.75% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
liualgotrader/analytics/analysis.py portfolio_return 14 🙂 325 ⛔ 14 😞 32.63% 😞 Try splitting into smaller methods. Extract out complex expressions
liualgotrader/common/data_loader.py SymbolData.__getitem__ 24 😞 237 ⛔ 9 🙂 37.47% 😞 Refactor to reduce nesting. Try splitting into smaller methods

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!

@amor71 amor71 merged commit 1eaa93a into master Jun 24, 2021
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.

Hyper-parameters optimization
1 participant