A django application for historic stock data analysis along with real-time stock charts and economic calender.
-
Check historical stock trend analysis on responsive charts which can be exported as png.
-
Realtime economic calender displaying latest events.
-
Automatically selects oldest or most records if start or end date not given.
-
Realtime stock chart.
-
Easy-to-implement REST API.
Click on the below image to watch a short video demonstration.
Clone the repository locally.
git clone https://github.com/defcon-007/histrock
Now create a virtual environment for the project
pip3 install virtualenv
virtualenv -p python3 ./venvhistrockActivate the virtual environment
source venvhistrock/bin/activateInstall the required modules
cd histrock
pip install -r requirements.txtNow make a local copy of the config-template.ini and complete the fields accordingly. (Postgresql database is recommended)
cp ./config-templat.ini ./config.ini
vim config.iniCollect static django assets
python manage.py collectstaticRun migrations
python manage.py migrateNow download the Postgresql database dump using curl or any other downloader of your choice or by clicking here.
curl https://s3.ap-south-1.amazonaws.com/defcon-public-static-assets/histrockDump.dump -o ../histrock.dumpAssuming you have setup the postgres database with name "histrockdatabase" use the following command as root to add data to database.
pg_restore -U postgres --data-only -d histrockdatabase -t api_stock ../histrockDump.dump
pg_restore -U postgres --data-only -d histrockdatabase -t api_stockhistoricdata ../histrockDump.dumpNow everything is setup run python manage.py runserver to run the local development server.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.



