-
Notifications
You must be signed in to change notification settings - Fork 25
Usage
All Commands assume you are running from the project's src
folder.
To sync data to the current date
py init.py
Output
Updating NSE actions file
Downloading Files
Starting Data Sync
EOD sync complete
Index sync complete.
Makings adjustments for splits and bonus
PDSL: face value split (sub-division) - from rs 10/- per share to rs 2/- per share
Cleaning up files
0 files deleted
26 Aug 2022: Done
For Linux users: Automate eod2 using crontab
For Windows users: Automating Python Scripts Using Windows Task Scheduler
plot.py <symbol 1> <symbol 2> ...
plot.py <keyword it | bank | watchlist>
plot.py <user defined keyword>
py plot.py tcs
Dark Blue bars represent above-average delivery and traded volume. See Analysing Delivery data.
Horizontal lines mark support and resistance.
By default:
- plot.py uses 60 days average to compare delivery and traded volume.
- 180 trading days are plotted.
plot.py
accepts multiple symbols as arguments like:
py plot.py <symbol 1> <symbol 2> ...
This will generate a chart for every symbol, each time you close the chart.
You can alternatively pass the following keywords: it
for IT stocks, bank
for banking stocks and watchlist
for basket of predefined stocks.
py plot.py watchlist
The stocks for each keyword are stored in src/data
folder. Replace the src/data/watchlist.csv
with your own watchlist. Each symbol on its own line.
See Analysing delivery data for explanation.
py dget.py [<symbol 1> <symbol 2> ...]
py dget.py hdfcbank marksans idfcfirstb
If no symbols are specified, a default list of symbols are displayed. You can edit this list in src/data/watchlist.csv
py dget.py
You can also pass keywords like it
for IT stocks, bank
for banking stocks. The stocks in these lists are defined in src/data
folder
py dget.py it
All configuration for EOD2 is stored in src/defs/Config.py
. Below is the help for Config.py that describes the options.
class Config(builtins.object)
| Config() -> None
|
| A class to store all configuration related to EOD2
|
| Attributes for AMIBROKER
| AMIBROKER: If True, converts bhavcopy to Amibroker format on
| sync. Data is stored in src/eod2_data/amibroker/
| Default False.
|
| AMI_UPDATE_DAYS: Number of days bhavcopy must be downloaded and formated
| to Amibroker.
| Only applies if src/eod2_data/amibroker/ is empty.
| Default 365.
|
| Attributes for plot.py
| PLOT_DAYS: Number of days to be plotted with plot.py.
| Default 180.
|
| PLOT_AVG_DAYS: Number of days average to calculate above average
| delivery. Default 60.
|
| Attributes for lookup.py
| LOOKUP_DAYS: Number of days delivery analysis to return.
| Default 15.
|
| LOOKUP_AVG_DAYS: Number of days average to calculate above average
|
| Keywords passed to dget.py and plot.py.
| WATCH: watchlist.csv
| IT: it.csv
| BANK: bank.csv
|
| Additional keywords can be defined with a user.json file in src/defs/.
| KEYWORD must be UPPERCASE and filename must be a file in src/data/.
| {
| "KEYWORD": <filename.csv>
| }
|
| To override the attributes of this class, create a user.json file in
| src/defs/ with the option you wish to override.
|
| All attributes in user.json must be uppercase.
As stated at the end, you can edit this configuration with a user.json stored in src/defs
folder.
{
"AMIBROKER": true,
"PHARMA": "pharma.csv"
}
Above i have set AMIBROKER option to true and added a new keyword for pharma stocks. Make sure to add pharma.csv
to src/data
folder.
Each symbol must be on its own line.
To print the current configuration, run init.py with argument c
.
py init.py c
EOD2 | Version: 3.0
AMIBROKER: False
AMI_UPDATE_DAYS: 365
PLOT_DAYS: 180
PLOT_AVG_DAYS: 60
LOOKUP_AVG_DAYS: 60
LOOKUP_DAYS: 15
WATCH: watchlist.csv
IT: it.csv
BANK: bank.csv