This project monitors the prices of Korean stocks, calculates group averages, checks for specific conditions, and sends email notifications when thresholds are met.
- Fetches real-time prices for a list of companies.
- Calculates group averages for stock prices.
- Checks for customizable conditions based on percentage changes.
- Sends email alerts when conditions are met.
- Runs continuously at a user-defined interval.
- Python 3.8+
pandasasyncio- Other dependencies as required by
scripts/
-
Clone the repository
git clone https://github.com/poxju/Korean-Stock-Market-Monitor.git cd Korean-Stock-Market-Monitor -
Install dependencies
pip install -r requirements.txt -
Prepare company data
- Place your
company_codes.xlsxfile in the project root. - The file should contain a column named
Company_Codewith the stock codes.
- Place your
-
Configure email settings
- Edit
main.pyand set your Gmail address, password, and receiver email:sender_email = "your_email@gmail.com" password = "your_password" receiver_email = "receiver_email@gmail.com"
- For Gmail, you may need to use an App Password.
- Edit
-
Set monitoring thresholds and interval
- Adjust the
thresholdsdictionary andintervalvariable inmain.pyas needed.
- Adjust the
Run the monitor script:
python main.py
The script will:
- Load company codes from
company_codes.xlsx - Start monitoring prices at the specified interval
- Print status updates to the console
- Send email notifications when conditions are met
- Modify
scripts/priceMonitor.pyto change how group averages or conditions are calculated. - Update
scripts/scraper.pyto change how prices are fetched.
- Ensure your email credentials are kept secure.
- This script is for educational and informational purposes.