DIY - Linear Forecasting CryptocurrenciessteemCreated with Sketch.

in #bitcoin7 years ago

bitcoin-2643159_1920.jpg


So let's put together all our knowledge that we have learned in the past 3 articles, so combining the "btc analyzer" and the "linear forecaster", I've put together a script to forecast or test the linear forecasting method on cryptocurrency markets or any other market data in a .csv format.

Linear forecasting is really the most basic thing and I have talked about this in the past 3 articles:

So now let's put it to practice, I have create a simple Python script for it, combining the 2 other softwares, and now we can analyze any data that is in a 2 column .csv format, in the first column the date, in the second the price, and there should be no commas in the first column (Coinmarketcap format does have, so it has to be removed).

So gather your cryptocurrency market data from here:

Just grab as many as you want, just keep in mind the format:

  • Only 2 columns, first column date (without commas), second column price, so basically only 1 comma should be and hat is the csv added comma
  • The date should be in ascending order, from the early data at the top and the new data at the bottom
  • I'd prefer daily data, although it doesn't matter



Bitcoin

My file is named btc_usd.csv, and it's the latest daily BTC data from blockchain.info

1.png

So it forecasted it pretty accurately for a linear mode, it assumes that the BTC price increases by 4.237$ daily on average and for a bad daily trade the potential loss would have been roughly 3%.



Doge

d1.png

Doge theoretically increases by 0.000000545 daily or perhaps it stagnates, trend reversion, who knows. Yet the model predicted it with an even bigger accuracy, however this is usually where the linear forecasting breaks apart, at trend reversions!



Litecoin

ltc.png



Ethereum

eth.png



Conclusion

And that’s about it, to forecast simply just add the difference to the latest price, and that will be the forecast of the future price.

Here is the full script:

Download Full Script Here!

The caveat is that linear forecasting falls apart when a trend reversion happens, and that is hard to predict, and may cause unproportional losses since a crash is always sudden and steep.

Thus linear forecasting is hardly used in finance, and in my opinion should not be used for anything other than education. There are professional tools to forecast financial markets that are designed for the structure of the market, since the market is not linear.



Disclaimer: The information provided on this page or blog post might be incorrect, inaccurate or incomplete. I am not responsible if you lose money or other valuables using the information on this page or blog post! This page or blog post is not an investment advice, just my opinion and analysis for educational or entertainment purposes.


Sources:
https://pixabay.com


Upvote, ReSteem & bluebutton


Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63179.13
ETH 2573.33
USDT 1.00
SBD 2.72