Coder Social home page Coder Social logo

Comments (3)

jamesphillipturpin avatar jamesphillipturpin commented on April 27, 2024 2

I think the more natural solution is to (have an options to) use logarithmic/exponential fit rather than linear fit. Fit to y=np.log(price) and then predict y. Return to the user price=np.exp(y). You could still get a price of 0.00 by rounding, say, 0.002 down to 0.00. It is a more realistic model for compound losses or compound gains. 75% loss is twice as bad as 50% loss. 100% loss is infinitely worse. And 100% gain offsets a 50% loss.

I'd also like to make predictions on volatility measures rather than just price. I would guess that sometimes it is easier to figure out just that a price may move more than usual rather than which direction. Volatility measures might also be bounded by zero.

I see we also get negative numbers for the lower bollinger bands curve for GME recently. Doing Bollinger Bands within a logarithmic/exponential pre-/post-processing framework could fix that such that you get useful levels not just zero. Having that as some kind of optional flag would allow users to use it only when they want it, and maybe use it modularly across different TA and prediction options with very little code modification.

from openbbterminal.

DidierRLopes avatar DidierRLopes commented on April 27, 2024

Hey guys,

Thank you @Bainsbe for pointing this out!

And thank you @jamesphillipturpin for this solution. I'll label this ticker as a new feature and will work on that flag as well soon.

Regardless, I think that the right thing to do if the prediction of the stock price is negative, is to output "Invalid prediction" or similar. As realistically, a stock wouldn't go to 0 either.

from openbbterminal.

aia avatar aia commented on April 27, 2024

Assuming this has been addressed in PR #436

from openbbterminal.

Related Issues (20)

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.