Skip to content
A historic stock analysis website made for Societe Generale Hackathon
HTML Python JavaScript CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
socgen_hackerearth
src
webview
.gitignore
LICENSE
README.md
config-template.ini
manage.py
requirements.txt

README.md

Histrock

A django application for historic stock data analysis along with real-time stock charts and economic calender.

Features

  • 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.

Screenshots

Screenshot Screenshot REST API

Demonstration

Click on the below image to watch a short video demonstration.

Histrock Video Demonstration

Installation

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 ./venvhistrock

Activate the virtual environment

source venvhistrock/bin/activate

Install the required modules

cd histrock
pip install -r requirements.txt

Now 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.ini

Collect static django assets

python manage.py collectstatic

Run migrations

python manage.py migrate

Now 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.dump

Assuming 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.dump

Now everything is setup run python manage.py runserver to run the local development server.

Contributing

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.

License

MIT

You can’t perform that action at this time.