GithubHelp home page GithubHelp logo

predicting-stock-market-crashes's People

Contributors

roman807 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

predicting-stock-market-crashes's Issues

Wrong drawdown calculation?

I don't think the drawdowns are computed correctly. By definition drawdowns are computed as follows:

Drawdowns from returns dfr as a dataframe:

# compute the wealth index from the non-cumulative returns
dfw = (1+dfr).cumprod()
# compute the drawdowns
dd = dfw / dfw.cummax() - 1

Drawdowns from prices dfp as a dataframe:

# compute the wealth index from prices
dfw = dfp / dfp.iloc[0, :]
# compute the drawdowns
dd = dfw / dfw.cummax() - 1

A simple check of your drawdowns being incorrect: compare to the underwater plot. You will see that the drawdowns you compute don't go from peak to trough. If this is incorrect all the downstream work will need to be revisited.

I believe the problem lies in the following computation. Here you get a marking on any decreasing price sequence but these are not the drawdowns. The drawdowns require the cumulative price maximum.

pmin_pmax = (ds['price'].diff(-1) > 0).astype(int).diff() #<- -1 indicates pmin, +1 indicates pmax

ModuleNotFoundError

Hi ,
I have already installed pip install scikit-learn but its not help to resolve error. Please help on following error

C:\Python39\Predicting-Stock-Market-Crashes-master\Predicting-Stock-Market-Crashes-master\final_predictor\main.py
Traceback (most recent call last):
File "C:\Python39\Predicting-Stock-Market-Crashes-master\Predicting-Stock-Market-Crashes-master\final_predictor\main.py", line 94, in
main()
File "C:\Python39\Predicting-Stock-Market-Crashes-master\Predicting-Stock-Market-Crashes-master\final_predictor\main.py", line 44, in main
model = pickle.load(open(model, 'rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.logistic'

Download new data and change the target variable.

Hi @roman807 ,
I want to try and recreate the project with the latest data and add some more
analytics.
I was wondering if you had the script to download the csv data sets.
Also I want to change to the target variable to a draw down in the 5% percent region.
I was wondering where in the code I could do this and re-run the experiments.

Many thanks,
Best,
Andrew

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.