Simple financial metric report tool via telegram
python ftgram.py
You have to make "token.txt" which includes your telegram token.
You can refer to How to create a telegram bot.
Help
/help: show usages
Ticker
/ticker: show tickers
/add <tickers>: add tickers
/del <tickers>: del tickers
Filter
/run <seconds>: run filter
/stop: stop filter
/filter: run filter once
/thres: show thresholds
/set <rsi|day> <L> <H>: set thres.
/job: show remaining time
Information
/price [<tickers>]: show prices
/pre [<tickers>]: show pre-prices
/post [<tickers>]: show post-prices
/rsi [<tickers>]: show rsi values
/draw [<tickers>] <months>: chart
/index: show index stat
/sector: show sector stat
Screener
/oversold: show 10 RSI<40 tickers
/overbought: show 10 RSI>60 tickers
Example:
/ticker
MSFT AAPL SPLG QQQ JEPI TSLA DBC IAU
Example:
/add NVDA O JPM
MSFT AAPL SPLG QQQ JEPI TSLA DBC IAU NVDA O JPM
Example:
/del MSFT AAPL
SPLG QQQ JEPI TSLA DBC IAU NVDA O JPM
Note: if all tickers are removed, SPY is automatically added
- Run filter function periodically
- Filter checks RSI and daily changes, then notifies if pre-defined conditions are satisfied
- The conditions are defined by two numbers, low threshold and high threshold
- If the metric is lower than low threshold or higher than high threshold, it is notified
- Filter results are displayed only when they are different from previous ones
Example:
/filter
[AAPL]↓ DAY(-2.7)<-2.0
[AAPL]↓ RSI(32.5)<35.0
[TSLA]↓ DAY(-3.6)<-2.0
[DBC ]↓ DAY(-2.9)<-2.0
Example:
/thres
RSI 35.0 65.0
DAY -2.0 2.0
Example:
/set rsi 30 70
RSI 30.0 70.0
DAY -2.0 2.0
Example:
/job
Job will be executed after 840 seconds
Example 1 (for current ticker):
/price
[JEPI ] 58.7 ( +0.1%)
[SPLG ] 49.1 ( -0.7%)
[MSFT ] 276.4 ( -1.3%)
[IAU ] 37.1 ( -1.5%)
[QQQ ] 318.2 ( -1.9%)
[AAPL ] 150.6 ( -2.7%)
[DBC ] 25.2 ( -2.9%)
[TSLA ] 766.4 ( -3.6%)
Example 2 (for arguments):
/price NVDA O
[NVDA ] 245.0 ( +6.6%)
[O ] 65.6 ( +0.7%)
Example 1 (for current ticker):
/rsi
[IAU ] 55.9
[DBC ] 54.9
[JEPI] 43.0
[MSFT] 38.6
[SPLG] 38.0
[TSLA] 37.8
[QQQ ] 35.0
[AAPL] 32.5
Example 2 (for arguments):
/rsi PYPL XOM
[PYPL ] 45.7
[XOM ] 43.7
Example 1 (draw msft and aapl chart for 3 month)
/draw msft aapl 3
Example 2 (draw current tickers for 6 month)
/draw 6
Example 3 (draw current tickers for 1 month)
/draw
Example:
/index
[Nasdaq] 12581.2 ( -2.0%)
[S&P500] 4173.1 ( -0.7%)
[DowJon] 32945.2 ( +0.0%)
[Nas(F)] 13045.5 ( +0.0%)
[S&P(F)] 4166.0 ( -0.1%)
[DOW(F)] 32869.0 ( -0.2%)
Example:
/sector
[Financ] 36.9 ( +1.3%)
[Health] 129.8 ( +0.7%)
[Defens] 71.8 ( +0.5%)
[Indust] 98.3 ( +0.3%)
[Utilit] 70.3 ( -0.1%)
[Materi] 81.7 ( -0.1%)
[RealEs] 45.6 ( -0.6%)
[S&P500] 417.0 ( -0.7%)
[Commun] 63.6 ( -1.2%)
[Cyclic] 163.9 ( -1.7%)
[Techno] 141.4 ( -1.9%)
[Energy] 74.5 ( -3.0%)
Example:
/oversold
[HD ] 37.9
[VZ ] 34.4
[PM ] 39.2
[UL ] 36.9
[C ] 40.0
[MDLZ ] 39.0
[TJX ] 38.8
[CL ] 39.5
[KMB ] 34.6
[BAX ] 35.7
Example:
/overbought
[AAPL ] 62.7
[GOOG ] 60.3
[GOOGL] 61.0
[AMZN ] 62.1
[TSLA ] 66.1
[BRK-B] 73.6
[BRK-A] 72.8
[NVDA ] 64.1
[UNH ] 64.5
[CVX ] 66.0