-
Notifications
You must be signed in to change notification settings - Fork 0
trgowtham/mfu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Steps to run this project for first time. All command will be executed at the level of this file. 1. Install tox to manager virtualenv `pip3.6 install tox` 2. Create virtual env by running tox.This will use tox.ini. `python3.6 -m tox` python3.7 -m tox 3. Activate virtual env `source .tox/py36/bin/activate` source .tox/py36/bin/activate 4. Now run any command in this project. To run the tool on sample data. Use '-f' for the first time. This will fetch the NAV data from mfapi. Subsequent runs need not have '-f' $ cd eq $ ./pd.py -f To run the tool using a PDF from CAMS, we need to make sure the fund mapping is proper. Make sure you follow the below steps 1. Update CSV.map to convert Fund name from CAMS format to a readable format. Eg: HDFC Balanced Fund,HDFC Hybrid Equity Fund <pattern>,<fund name> .*HDFC Balanced Fund.* will be converted to 'HDFC Hybrid Equity Fund' Run cams_conver_csv.py to make sure the resultant CSV is readable $ ./cams_convert_csv.py Usage: cams_convert_csv.py <CSV exported from CAMS> <CSV file name to export> 2. Update the MFAPI code. Visit https://www.mfapi.in and search for your fund Eg: For 'Indiabulls Ultra Short Fund', the search result is https://api.mfapi.in/mf/119143. So add an entry to MF-EQ.csv as below Indiabulls_Ultra_Short_Term,119143 Please note the '_' instead of spaces 3. Run mfu.sh with path to CAMS.pdf and password as arguments. $ ./eq/mfu.sh mfu.sh -p <Full path to CAMS pdf> -z <Password to the pdf file> -f Load latest NAV -m <Fund file> -r <Report directory> Default ../report -c Report only capital gain '-p', '-z' are mandatory options to be given i.e PDF and password '-f' to be run for first time. Subsequently it has to be given if we want to load latest NAV from mfapi '-m' is optional. Give if the list of funds is different from what reported in PDF. Eg: We do not want data of funds which are no longer active. '-r' is optional. The directory where the report will be stored. mfu/<report_dir> '-c' is optional. If given, it reports only capital gain/loss year-wise. If you want to skip few funds and interested only in few of them, create a file like GT.funds and add all valid funds to it. Feed it to script using '-m' to mfu.sh Eg: $ head GT.funds Aditya_Birla_Sun_Life_Equity_Advantage_Fund Aditya_Birla_Sun_Life_Frontline_Equity Axis_Long_Term_Equity 5. Other tools duration.py $ mfu/ref/duration_inv.py Usage: duration_inv.py <CSV file path> <fund string> <start date 01-01-2017> <end date 01-01-2017> Give input as the CSV file, <fund pattern> , start date and end date. It will tell unit txn during that period. Useful for selling Fund units older than a year to avoid STCG/Exit load. Eg: $ ./duration_inv.py ../eq/VR.csv small 20-Jun-2017 22-Jun-2019 Loading from ../eq/VR.csv... Fund Name: Franklin Templeton Franklin India Smaller Companies Start date: 20-Jun-2017 End date: 20-Jun-2019 Units: 878.788 Amt: 52000.0 Cur Value: 39556.62 (24-07-2020)
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published