# HTM for stock price prediction

**URL:** <https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061>\
**Category:** Applications\
**Created:** [January 15, 2020, 6:43am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061 "2020-01-15T06:43:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo\_M](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/leo_m/32/4850_2.png) [@Leo\_M](https://discourse.numenta.org/u/Leo_M)\
**Post date:** [January 15, 2020, 6:43am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/1 "2020-01-15T06:43:51Z")

</div>

Hello.

I’m a masters student.  
My dissertation is to do research on the use of ML algorithms in Trading(Finance),  
I’ve been advised by my supervisor to consider CLA as an alternative for Deep Learning/RL/Q Learning, but having read some pdfs ,documentations and examples of HTM/CLA implementations I feel like there is no way to make it work in my dissertation or in case if there is it is not suitable for Masters dissertation maybe it is for PHd.

Am I right ?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [January 15, 2020, 11:11pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/2 "2020-01-15T23:11:40Z")

</div>

[Here is a PDF](https://numenta.com/assets/pdf/apps/htmforstocks.pdf) with links a sample codebase of a mobile applications for stock analysis using HTM.

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [January 15, 2020, 11:31pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/3 "2020-01-15T23:31:28Z")

</div>

I am a little put off by trying to predict stock.

Other than spotting that the market has some general trend it is essentially a random number generator.

I could see a case where you dumped in massive data for all aspects of the economy to spot leading indicators but I have to point out that this has been tried for a long time and to be best of my knowledge, nobody is doing much better than guessing a coin toss.

---

<div class="post-metadata">

**Author:** ![jimmyw](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/jimmyw/32/1485_2.png) [@jimmyw](https://discourse.numenta.org/u/jimmyw)\
**Post date:** [January 16, 2020, 9:53am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/4 "2020-01-16T09:53:36Z")

</div>

> [@Bitking](#):
>
> I could see a case where you dumped in massive data for all aspects of the economy to spot leading indicators but I have to point out that this has been tried for a long time and to be best of my knowledge, nobody is doing much better than guessing a coin toss.

Yeah this seems about right. It requires a large amount of domain knowledge and natural language understanding to interpret what’s going on and how it might affect market sentiment. For example, how do you predict geopolitical events like the killing of Qasem Soleimani a couple of weeks ago?

---

<div class="post-metadata">

**Author:** ![sheiser1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/sheiser1/32/766_2.png) [@sheiser1](https://discourse.numenta.org/u/sheiser1)\
**Post date:** [January 16, 2020, 9:38pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/5 "2020-01-16T21:38:58Z")

</div>

> [@Bitking](#):
>
> Other than spotting that the market has some general trend it is essentially a random number generator.

> [@jimmyw](#):
>
> It requires a large amount of domain knowledge and natural language understanding to interpret what’s going on and how it might affect market sentiment.

These realities must make it harder to get good signal/noise ratios from stocks – which makes it into a feature engineering problem. How to get metrics with enough periodicity to at least distinguish predictable from random activity. Maybe use multivariate anomaly detection to look for general shifts in an asset class like currencies? It seems all about sussing out signal and not going for anything too specific.

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [January 16, 2020, 9:52pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/6 "2020-01-16T21:52:03Z")

</div>

We have centuries of market training data in place. Many people have done the equivalent of autocorrelation with virtually every conceivable factor thrown into the mix. Even standard leading indicators are not very reliable; for example - according to the baltic dry index industry should be on it’s knees right now.

The problem is that the major influence factors are essentially black swans that are by definition unpredictable. These random factors filter through the system and are reflected as random price moves. Garbage in - garbage out!

> **[Baltic Dry Index](https://en.wikipedia.org/wiki/Baltic_Dry_Index)**
>
> The Baltic Dry Index (BDI), is issued daily by the London-based Baltic Exchange. The BDI is a composite of the Capesize, Panamax and Supramax Timecharter Averages. It is reported around the world as a proxy for dry bulk shipping stocks as well as a general shipping market bellwether.
> The BDI is the successor to the Baltic Freight Index (BFI) and came into operation on 1 November 1999. The BDI continues the established time series of the BFI, however, the voyages and vessels covered by the ind...

  

> **[Economic indicator](https://en.wikipedia.org/wiki/Economic_indicator)**
>
> An economic indicator is a statistic about an economic activity. Economic indicators allow analysis of economic performance and predictions of future performance. One application of economic indicators is the study of business cycles. Economic indicators include various indices, earnings reports, and economic summaries: for example, the unemployment rate, quits rate (quit rate in U.S. English), housing starts, consumer price index (a measure for inflation), consumer leverage ratio, industrial pro...

  

> **[Black swan theory](https://en.wikipedia.org/wiki/Black_swan_theory)**
>
> The black swan theory or theory of black swan events is a metaphor that describes an event that comes as a surprise, has a major effect, and is often inappropriately rationalized after the fact with the benefit of hindsight. The term is based on an ancient saying that presumed black swans did not exist – a saying that became reinterpreted to teach a different lesson after black swans were discovered in the wild.
> The theory was developed by Nassim Nicholas Taleb to explain:
> Unlike the earlier...

---

<div class="post-metadata">

**Author:** ![pulinagrawal](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/pulinagrawal/32/3121_2.png) [@pulinagrawal](https://discourse.numenta.org/u/pulinagrawal)\
**Post date:** [January 16, 2020, 11:55pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/7 "2020-01-16T23:55:24Z")

</div>

Just wanted to point out that here at [https://intelletic.com/](https://intelletic.com/) we are using HTM technology to trade futures and we are definitely doing it better than coin toss. As mentioned on the website, we have back-tests that have produced 47.3% simple annual returns and our live tests conform to these metrics.

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [January 16, 2020, 11:59pm UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/8 "2020-01-16T23:59:40Z")

</div>

Not surprising in a rising market.  
Get back to me when the market goes into bear territory.

---

<div class="post-metadata">

**Author:** ![pulinagrawal](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/pulinagrawal/32/3121_2.png) [@pulinagrawal](https://discourse.numenta.org/u/pulinagrawal)\
**Post date:** [January 17, 2020, 12:13am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/9 "2020-01-17T00:13:25Z")

</div>

Our technology works regardless of whether the market is going down or up. We are able to profit from both the market directions.

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [January 17, 2020, 12:58am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/10 "2020-01-17T00:58:32Z")

</div>

Keep up the good work!

---

<div class="post-metadata">

**Author:** ![jimmyw](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/jimmyw/32/1485_2.png) [@jimmyw](https://discourse.numenta.org/u/jimmyw)\
**Post date:** [January 18, 2020, 8:22am UTC](https://discourse.numenta.org/t/htm-for-stock-price-prediction/7061/11 "2020-01-18T08:22:27Z")

</div>

Btw, if I was getting anywhere near 47% annual return, I wouldn’t be looking for investors!
