Commit Graph

403 Commits

Author SHA1 Message Date
b8c268652f fix: Import missing portfolio value functions from trading.journal 2025-02-10 23:15:24 -08:00
cfe17976b2 fix: Resolve syntax error in portfolio value display condition 2025-02-10 23:15:12 -08:00
7beaee7d10 fix: Correct incomplete if statement in portfolio value section 2025-02-10 23:15:00 -08:00
02496c3a3c feat: Add trading system page with position calculator, portfolio management, and value tracking 2025-02-10 23:11:16 -08:00
91e6b7f2b6 feat: Add unique keys to text_area elements in trading journal page 2025-02-10 23:01:48 -08:00
b71a3eef38 fix: Remove nested try block and simplify error handling in trade update 2025-02-10 23:00:24 -08:00
a99deffa9f feat: Add date and time input fields for updating trade entry details 2025-02-10 22:59:59 -08:00
6f5dadbe5c feat: Add interval selection to technical scanner page 2025-02-10 22:56:18 -08:00
8b56c3c8e5 feat: Add date range inputs and update technical scanner function parameters 2025-02-10 22:54:18 -08:00
0dd86ebe42 refactor: Modify scanner_controller to accept parameters directly and use dictionary mapping 2025-02-10 22:53:04 -08:00
9e1cccd3b6 feat: Add unique keys to selectboxes to resolve duplicate element ID error 2025-02-10 22:49:09 -08:00
28f0eee4ec feat: Add CANSLIM screener interface to Streamlit app 2025-02-10 22:45:06 -08:00
3bd73572af changed the screen reports folder 2025-02-10 22:42:36 -08:00
6643e891da fix: Add missing pandas import to resolve undefined name error 2025-02-10 22:40:20 -08:00
099c8b353e feat: Add CSV report viewing functionality to technical scanner page 2025-02-10 22:40:11 -08:00
e001d2e766 feat: Create Streamlit app with trading journal, technical scanner, and navigation 2025-02-10 22:35:13 -08:00
536622d1ca fix: Add shares input prompt for sell order in trading journal 2025-02-10 19:05:41 -08:00
dcfc657ced fix: Remove duplicate shares input in journal_menu function 2025-02-10 19:05:29 -08:00
6e4c26c73d feat: Allow user-provided entry date when creating trade entries 2025-02-10 19:02:09 -08:00
e89f673709 feat: Add delete trade functionality to journal menu 2025-02-10 18:53:24 -08:00
5aa6d0effe refactor: Modify update_trade to handle ClickHouse sorting key limitation 2025-02-10 18:50:22 -08:00
3e57a678f7 fix: Replace undefined update_trade_exit with update_trade 2025-02-10 18:47:55 -08:00
3819547de7 feat: Enhance trade update functionality with flexible field modifications 2025-02-10 18:47:44 -08:00
933141618b refactor: Update get_current_prices to use fast_info for reliable price fetching 2025-02-10 11:21:23 -08:00
3a985aa1f5 feat: Add get_current_prices function with yfinance support 2025-02-10 11:09:58 -08:00
cfa3e67417 fix: Resolve syntax error in get_current_prices function 2025-02-10 11:06:59 -08:00
1416d1b912 feat: Add real-time price tracking and P/L calculations using yfinance 2025-02-10 11:06:46 -08:00
8ea233ff7c feat: Add FIFO sell order handling in trade journal 2025-02-10 10:31:16 -08:00
952dfcd266 fix: Correct menu logic for portfolio value update and system exit 2025-02-10 10:18:59 -08:00
c363745542 feat: Initialize Portfolio and load existing trades in main function 2025-02-10 10:13:32 -08:00
c6089549ca fix: Correct syntax error in portfolio data check condition 2025-02-10 10:11:55 -08:00
838a2ac7d0 feat: Integrate portfolio tracking and cash balance management in trading system 2025-02-10 10:11:17 -08:00
529875527b feat: Resolve circular imports and create scanner_utils module 2025-02-10 10:01:46 -08:00
3dbaed0399 feat: Add user input escape mechanism with consistent quit options 2025-02-10 09:58:25 -08:00
9ccccfce97 feat: Add open trades summary with ticker-level insights and detailed trade information 2025-02-10 09:54:22 -08:00
6b09c85587 feat: Add target_price, stop_loss, and strategy to position summary query 2025-02-10 09:47:44 -08:00
0ce4bb4486 feat: Add timezone-aware datetime input with market hours validation 2025-02-10 09:45:29 -08:00
25a664e5bb fix: Update ClickHouse client query method in get_position_summary 2025-02-10 09:40:38 -08:00
4ebfcfebd1 fix: Update database operations for clickhouse-connect compatibility 2025-02-10 09:39:35 -08:00
e906c63893 feat: Enhance trading journal with multi-order position tracking and order types 2025-02-10 09:38:16 -08:00
15aadbe3da refactor: Modify ClickHouse database operations in journal.py for HTTP client compatibility 2025-02-10 09:33:19 -08:00
d6b6a289ed fix: Update import paths for trading module classes 2025-02-10 09:30:25 -08:00
3d4c48b82f fix: Add missing condition to check for empty data in process_symbol function 2025-02-10 09:29:01 -08:00
b887269152 refactor: Update import paths and add journal_menu function to journal.py 2025-02-10 09:27:13 -08:00
4e5b54c568 fix: Resolve indentation error in main.py by wrapping menu loop in main() function 2025-02-10 09:25:16 -08:00
0b40142bfb refactor: Simplify main menu logic with function calls 2025-02-10 09:24:22 -08:00
3425539781 refactor: Modularize main application structure and separate concerns 2025-02-10 09:23:51 -08:00
590c6fd2b7 feat: Add trading journal feature with database tracking 2025-02-10 09:18:16 -08:00
937e52f2f7 fix: Add missing imports for pandas, datetime, and db client 2025-02-09 12:18:57 -08:00
572ab3a3e1 refactor: Standardize scanner implementations using utility functions 2025-02-09 12:18:40 -08:00
f7ab8d6513 fix: Add missing imports to resolve undefined name errors 2025-02-09 12:16:40 -08:00
7f105bfd54 refactor: Modularize scanner initialization and signal processing 2025-02-09 12:16:27 -08:00
d8b41c8d8a feat: Add stock_type to signal processing in t_atr_ema_v2.py 2025-02-09 12:13:43 -08:00
1cc04b500a feat: Add stock_type to signal data in t_sunnyband.py 2025-02-09 12:12:28 -08:00
a80a4b12e5 feat: Add stock type to qualified stocks query and output 2025-02-09 12:10:02 -08:00
b8eaafafd6 fix: Correct price and volume filtering in get_qualified_stocks query 2025-02-09 00:45:19 -08:00
fcc8203aae fix: Add missing import for get_qualified_stocks in scanner files 2025-02-09 00:37:32 -08:00
1e6a05c81d refactor: Move common stock query logic to get_qualified_stocks function 2025-02-09 00:37:18 -08:00
69c5b12fd3 fix: Update SQL queries to handle trade_date column consistently 2025-02-09 00:35:30 -08:00
bf6c5e0880 refactor: Update SQL queries for consistent date handling in screeners 2025-02-09 00:32:58 -08:00
0a5ffbcadb fix: Correct datetime handling in scanner queries 2025-02-09 00:32:20 -08:00
c03a361096 fix: Correct timestamp handling in stock details query 2025-02-09 00:28:35 -08:00
d4e0bc2c92 refactor: Update scanner queries to calculate daily close prices from timestamps 2025-02-09 00:20:10 -08:00
cd7a33cb7e refactor: Filter stock data before aggregation in scanner queries 2025-02-09 00:15:02 -08:00
a9d380897a refactor: update entry conditions in ATR EMA scanners for better precision 2025-02-08 21:59:06 -08:00
1b852b2d8d fix: Remove nested try block and fix indentation in SQL query 2025-02-08 20:55:11 -08:00
819c91ff4a fix: Correct nested try blocks and indentation in t_sunnyband.py 2025-02-08 20:54:51 -08:00
4984d4944a fix: Properly use context manager for database connections in scanners 2025-02-08 20:54:31 -08:00
865438bbf8 refactor: Replace connection pool with context manager for ClickHouse connections 2025-02-08 20:52:36 -08:00
68e665a0c2 fix: Remove invalid 'use_session_id' setting from ClickHouse client config 2025-02-08 20:47:59 -08:00
906ecb7816 refactor: Rename get_client to create_client for consistency 2025-02-08 20:44:27 -08:00
a5cef08fd2 feat: add connection pool for managing multiple database connections 2025-02-08 20:41:08 -08:00
125273f22b refactor: Remove session handling in db_connection.py 2025-02-08 20:39:55 -08:00
4cf73e0a69 feat: Enhance ClickHouse client settings for better performance and session management 2025-02-08 20:35:32 -08:00
4dcb9c969e fix: Disable session checking and optimize ClickHouse client config 2025-02-08 20:27:33 -08:00
8d7ecb4f39 chore: Suppress urllib3 SSL warnings in main.py 2025-02-08 20:16:58 -08:00
c610bc7d4a refactor: Update Sunny Bands scanner to match ATR EMA pattern and focus on bullish signals 2025-02-08 20:06:53 -08:00
15304106ac refactor: standardize ATR EMA scanner to scan entire date range 2025-02-08 20:05:29 -08:00
cea43c4d32 feat: Add time interval resampling to stock data fetching 2025-02-08 20:03:59 -08:00
7e046a1e33 feat: Scan entire date range for signals in ATR EMA strategy 2025-02-08 19:52:55 -08:00
0ca47d3c3d fix: Add missing os import to data_utils.py 2025-02-08 19:47:21 -08:00
af1f245c7a fix: Remove incorrect 'risk' key access in t_atr_ema.py 2025-02-08 19:09:22 -08:00
ba73f3ddca fix: Add missing os import in data_utils.py 2025-02-08 19:06:05 -08:00
1d521bee85 fix: Improve error reporting in print_signal with ticker and available keys 2025-02-08 19:05:50 -08:00
3c6e69de62 refactor: Replace signal print statements with print_signal function 2025-02-08 19:01:28 -08:00
fd3ded3f72 refactor: Centralize signal output and CSV saving in data_utils.py 2025-02-08 19:01:18 -08:00
b64e3b5a27 fix: Add signal_date definition from DataFrame in t_sunnyband.py 2025-02-08 18:59:35 -08:00
8c1b98860f refactor: Standardize CSV output structure across all scanners 2025-02-08 18:59:19 -08:00
bf0adcb163 fix: Store EMA value in entry_data to prevent KeyError 2025-02-08 18:03:23 -08:00
9d8a4167d0 feat: Add potential profit display to screener outputs 2025-02-08 17:59:59 -08:00
1d51e491f2 fix: Prevent future dates in queries and add date validation 2025-02-08 17:55:37 -08:00
0d0c4944d8 refactor: Remove session management from db_connection.py 2025-02-08 17:51:43 -08:00
cd4691a4cb fix: Remove invalid keep_alive_timeout setting from ClickHouse client 2025-02-08 17:49:34 -08:00
58841c9a08 feat: Enhance ClickHouse client with improved session management and error handling 2025-02-08 17:38:58 -08:00
1c23444e5b feat: Add exponential backoff for session lock retries in ClickHouse client 2025-02-08 17:32:39 -08:00
5afd77b9a0 feat: Add signal dates to sunnyband scanner output 2025-02-08 17:11:27 -08:00
516533800f refactor: Use consistent date range input in sunny band scanner 2025-02-08 13:20:17 -08:00
2f784e5d65 feat: Add signal dates to ATR EMA screeners for backtesting 2025-02-08 12:32:14 -08:00
a8dd33c3d9 feat: add date range input functionality to stock scanners 2025-02-08 12:19:34 -08:00
0f60515442 refactor: Update import in t_atr_ema.py to use data_utils module 2025-02-08 12:16:19 -08:00
c2ac523d83 fix: Import get_stock_data in t_sunnyband.py 2025-02-08 12:14:13 -08:00
012fa0e071 refactor: Move get_stock_data to utils module for shared usage 2025-02-08 12:13:59 -08:00
d41d40ab4f fix: Update function name in main.py to match t_atr_ema_v2 implementation 2025-02-08 12:08:32 -08:00
98f13c0d9d fix: Correct import and __all__ list in screener/__init__.py 2025-02-08 12:07:43 -08:00
7775999f3b feat: add Three ATR EMA v2 screener with entry signal logic 2025-02-08 12:06:55 -08:00
7ba3f07ad4 fix: Improve error handling and data resampling in indicator calculation 2025-02-08 11:52:28 -08:00
41380c3638 fix: correct timestamp handling and add date validation in stock data queries 2025-02-08 11:50:25 -08:00
44beec4b6c fix: Update date handling in ClickHouse query to filter future dates 2025-02-08 11:47:34 -08:00
a67f88211f fix: Correct timestamp handling in ClickHouse query for ATR EMA scanner 2025-02-08 11:44:04 -08:00
5b07a565f9 feat: Add date validation to stock data queries 2025-02-08 11:42:36 -08:00
69f0bd532c fix: Correct date handling and validation in ATR EMA scanner 2025-02-08 11:42:24 -08:00
9f95ee14fc fix: Enhance data validation and debugging in ATR EMA screener 2025-02-08 11:40:33 -08:00
02a26636e3 fix: Enhance data validation and type handling in screener scripts 2025-02-08 11:39:01 -08:00
b4312e92d4 fix: Add validation checks for missing 'close' column in stock data 2025-02-08 11:35:37 -08:00
6be64ebe03 gpt fix 2025-02-08 11:33:09 -08:00
316ce608b6 refactor: Update SQL query to use window_start and timestamp conversion 2025-02-08 11:16:00 -08:00
196ca39e63 fix: Update ClickHouse queries to use window_start column correctly 2025-02-08 11:15:21 -08:00
b820c5a5b2 fix: Enhance data fetching with fallback logic and expanded time ranges 2025-02-08 11:09:19 -08:00
7ef27027ee fix: Replace async ClickHouse query with synchronous method 2025-02-08 11:01:13 -08:00
8560214494 feat: Improve data fetching with wider range and batch validation 2025-02-08 10:57:30 -08:00
114e0f6165 fix: Correct interval format and enhance data fetching error handling in ATR-EMA scanner 2025-02-08 10:53:27 -08:00
86686125f3 feat: Add ATR EMA target scanner for stock analysis 2025-02-08 10:53:21 -08:00
389975605c refactor: Remove duplicate code block in user input handling 2025-02-08 10:50:00 -08:00
27ffc80432 feat: Integrate ATR-EMA v2 scanner with updated menu and imports 2025-02-08 10:49:04 -08:00
7a72cdf83b fix: Update resample rule format from 'T' to 'min' in t_sunnyband.py 2025-02-08 08:33:01 -08:00
cbc08d7772 fix: Import get_interval_choice and remove duplicate os import 2025-02-08 08:30:44 -08:00
c1fbac6103 feat: Add 7% stop loss and portfolio-based position sizing 2025-02-08 08:28:20 -08:00
bf71fa5fb2 feat: Update default stop loss to 7% and improve position sizing output 2025-02-08 08:21:28 -08:00
b9d6243bbe fix: correct boolean operations and column naming in ThreeATREMAIndicator 2025-02-08 08:07:03 -08:00
2103367a18 fix: Define previous_price to resolve undefined name error in function 2025-02-08 07:55:21 -08:00
bb3d67ead9 fix: Correct logic in check_atr_ema_buy_condition to use previous price 2025-02-08 07:55:13 -08:00
b1d86d988a fix: Replace bitwise operator with logical operator in buy condition check 2025-02-08 07:52:20 -08:00
a012872592 fix: Remove unterminated triple-quoted string in user_input.py 2025-02-08 07:50:32 -08:00
3fb5a8855b fix: Remove unterminated triple-quoted string in user_input.py 2025-02-08 07:50:20 -08:00
8cd2b39849 feat: Uncomment and define get_user_screener_selection function in user_input.py 2025-02-08 07:50:14 -08:00
b341bd53ce fix: Import get_interval_choice to resolve undefined name error 2025-02-08 07:47:41 -08:00
c39bc7984d feat: Move get_interval_choice function to user_input.py from t_sunnyband.py 2025-02-08 07:47:28 -08:00
df4ee34b3a fix: Define 'results' in check_atr_ema_buy_condition function 2025-02-08 07:46:06 -08:00
8f34d143c8 fix: Define indicator and reorder start_date initialization in t_atr_ema.py 2025-02-08 07:45:58 -08:00
422e11e4bf fix: Define missing variables and import necessary functions in t_atr_ema.py 2025-02-08 07:45:39 -08:00
41537c1021 fix: Import get_interval_choice to resolve NameError in t_atr_ema.py 2025-02-08 07:45:09 -08:00
e46b6cb39c The changes add a new feature to allow users to select the ATR-EMA scanner from the main menu by choosing option 2 and then selecting the sub-option. The commit message should reflect this addition.
feat: add ATR-EMA scanner option to main menu
2025-02-08 03:14:42 -08:00
d6f2e1b961 feat: Add support for ATR EMA scanner with enhanced position calculator integration 2025-02-07 21:19:57 -08:00
0a4d5c2a5d feat: Add support for Three ATR EMA indicator configuration 2025-02-07 20:52:27 -08:00
55aafdb345 feat: Add Three ATR EMA trading indicator with signal logic 2025-02-07 20:41:20 -08:00
6ee4e3a34b
chore: Remove SQL query print statements and add trading info prints 2025-02-07 09:18:12 -08:00
4f545d5041
fix: Align except block with try block in get_stock_data function 2025-02-07 09:18:11 -08:00
b5125a409f
fix: Correct syntax error by adjusting exception handling indentation 2025-02-07 09:18:11 -08:00
76075cd104
fix: Correct indentation error in get_stock_data function 2025-02-07 09:18:11 -08:00
b67586116c
fix: Correct indentation error in get_stock_data function 2025-02-07 09:18:11 -08:00
8573399f9d
chore: Add debug prints for SQL query execution in stock data retrieval 2025-02-07 09:18:11 -08:00
d0583ddcc3
refactor: Update sunny scanner to use intraday stock_prices table 2025-02-07 09:18:11 -08:00
7faf56a712
refactor: Optimize sunny scanner with direct database query and simplified processing 2025-02-07 09:18:10 -08:00
e7a32dd9ab
init python 2025-02-06 23:26:11 -08:00
8d5a194ec6
refactor: Simplify run_sunny_scanner with focused output and concise processing 2025-02-06 23:23:45 -08:00
b58df4f952
feat: Add debug output for SunnyBands signal verification in scanner 2025-02-06 23:15:59 -08:00
3f10207481
refactor: Improve SunnyBands target price calculation using band range 2025-02-06 23:10:41 -08:00
fe2b13dff5
refactor: Improve target price calculation for more aggressive trading signals 2025-02-06 23:09:51 -08:00
53ebc1767c
refactor: Add debug output for entry price and upper band in sunny scanner 2025-02-06 23:03:37 -08:00
4a3464b2d9
refactor: Improve numeric output readability with rounding and formatting 2025-02-06 22:57:52 -08:00
6ca78eb83f
refactor: Convert numpy float64 values to Python floats in position calculation 2025-02-06 22:55:12 -08:00
d1a48dfb25
refactor: Remove duplicate position details section and use upper band as target price 2025-02-06 22:52:49 -08:00
48745fbd34
feat: Enhance signal output with detailed position sizing and profit metrics 2025-02-06 22:50:55 -08:00
c248fd05df
refactor: Improve position details display with float conversion and percentage calculations 2025-02-06 22:49:14 -08:00
0648265c62
feat: Add debug prints to track bullish signal and position calculation process 2025-02-06 22:47:44 -08:00
7c8dd5e58d
feat: Add debug print for portfolio size in SunnyBands scanner 2025-02-06 22:45:32 -08:00
f154840666
refactor: Update bullish signal display with more trading-focused details 2025-02-06 22:43:40 -08:00
7a04e8d05f
refactor: Update sunny scanner to use root 'reports' directory 2025-02-06 22:39:16 -08:00
88b944851a
feat: Add position sizing to Sunny Scanner with portfolio input 2025-02-06 22:37:03 -08:00
843f78851f
refactor: Update date range and intraday data query for accurate stock scanning 2025-02-06 22:31:05 -08:00
62b63388a8
fix: Correct date formatting in stock data query for ClickHouse 2025-02-06 22:29:11 -08:00
319f18d882
refactor: Update timestamp handling for nanosecond precision in stock data queries 2025-02-06 22:27:40 -08:00
207991b9f0
fix: Replace undefined 'today' with 'end_date' in stock data queries 2025-02-06 22:23:28 -08:00
507687dc90
fix: Improve date handling for stock data retrieval and ticker selection 2025-02-06 22:23:16 -08:00
99ea46f6b1
refactor: Modify view_stock_details to show detailed query and raw results 2025-02-06 22:21:46 -08:00
bb3c5fe933
feat: Add detailed stock view function and interactive signal exploration 2025-02-06 22:19:55 -08:00
bf4c5a1b94
refactor: Update stock data retrieval to use consistent 60-day lookback 2025-02-06 22:17:48 -08:00
1d04986a07
refactor: Enhance get_valid_tickers to check intraday data across yesterday and today 2025-02-06 22:15:56 -08:00
ccf6671f4b
feat: Enhance stock screening with daily data filtering and intraday validation 2025-02-06 22:13:19 -08:00
4f6b811666
fix: Update intraday ticker query to use today's market hours 2025-02-06 22:06:32 -08:00
abcdd561ca
refactor: Update get_valid_tickers to support intraday and daily intervals 2025-02-06 22:04:14 -08:00
971a5dd4a1
refactor: Improve date handling in get_stock_data for daily and intraday queries 2025-02-06 22:02:22 -08:00
9c440f08da
feat: Add time interval selection for SunnyBand scanner 2025-02-06 22:00:26 -08:00
1b6e93badf
feat: Enhance SunnyBand scanner with progress tracking and error handling 2025-02-06 21:57:53 -08:00
5273b659e1
feat: Add SunnyBand scanner functionality to screener module 2025-02-06 21:54:38 -08:00
a3a87c1e7d
feat: Add SunnyBand scanner and multi-system menu to main.py 2025-02-06 21:51:58 -08:00
fc7a6e7343
feat: Add SunnyBands indicator implementation with ATR and signal generation 2025-02-06 21:42:01 -08:00
c3f8d7ce80
feat: Add indicators package initialization file 2025-02-06 21:41:51 -08:00
a536ec5e15
feat: Add target price and risk/reward calculations to position sizing 2025-02-06 21:22:27 -08:00
5f7c02a470
feat: Add potential profit, loss, and risk/reward ratio calculations to positions 2025-02-06 21:19:56 -08:00
8740ccf9eb
refactor: Update position calculator with dynamic account size and automatic stop loss 2025-02-06 21:16:07 -08:00
b7d3b8bc6d
feat: Add trading app with position calculator and portfolio management 2025-02-06 21:10:59 -08:00
8302d796e0
fix: Refactor 52-week high calculation in industry leadership check 2025-02-06 19:07:42 -08:00
327c3b8dfe
refactor: Update industry leadership check to use multiple tables and RSI 2025-02-06 19:05:44 -08:00
c0285bb0c7
feat: Integrate I_Score for institutional sponsorship in CANSLIM screener 2025-02-06 18:59:10 -08:00
f62cd47292
feat: Add institutional sponsorship check for CANSLIM strategy 2025-02-06 18:56:38 -08:00
9b6871d575
L CANSLIM 2025-02-03 23:33:42 -08:00
9cb4f62a48
Added screener type choice 2025-02-03 22:40:26 -08:00
e1d59411fa
Added total score to CSV 2025-02-03 22:14:12 -08:00
b6c6518ad4
Annual EPS 2025-02-03 22:10:09 -08:00
cb098278c9
C in CANSLIM 2025-02-03 21:53:26 -08:00
ec31b8701d
create .env and update db_connection to use it 2025-02-03 20:20:19 -08:00
bbc307f3d8
first commit 2025-02-03 20:11:47 -08:00