0

If I have a tool to predict daily direction of stock price change, is it possible to daily recover price change as cash? Say, my machine learning can tell me if tomorrow GOOG will close low or high, is it true that I can make money by:

  1. If I think tomorrow GOOG will be higher, then I borrow cash to buy 1 share today, sell it tomorrow, return the cash, and pocket the difference
  2. If I think tomorrow GOOG will close lower, then borrow 1 share from my broker, sell it today, buy 1 share tomorrow, return it, and pocket the difference.

Is it how shorting the stock works?

The problem I am facing is that I don't understand how my ML-based predictor with %80 accuracy can generate $1000 in cash by daily trading 1 share of GOOG for 3 months:

enter image description here

UPD: I wasn't truncating data properly: testing data was a subset of training data. Now testing is %52 accurate

  • 4
    #2 is how shorting works, and yes, you'd make money each way if the price swings were large enough to cover the trading fees. – RonJohn Aug 31 at 22:31
  • @RonJohn yup, that is what not part of the equation here: the fees, interest rates etc. But average GOOG swing was +/-$8 on a $1200 stock. – Oct18 is day of silence on SE Aug 31 at 22:37
  • 1
    If there's a $5 transaction fee, then you'd loose $2 on that $8 swing because there's $5 purchase, and $5 to sell. – RonJohn Aug 31 at 22:42
  • 1
    What, no promo ad? – Bob Baerker Sep 1 at 0:26
  • 1
    You're also ignoring capital gains taxes on any profit you might realize. – Dugan Oct 23 at 16:05
4

I don't understand how my ML-based predictor with %80 accuracy can generate $1000 in cash by daily trading

I strongly suspect that your evaluation of the predictor is flawed. For example, you may be looking at the performance for the same data period used to train the model. Or you may have a fluke for a particular few-month period. You should look at how a strategy performs subsequent to all data used in its construction.

  • 2
    yup, i wasn't truncating data properly, as you said: testing data was a subset of training data. Now testing is %52 accurate :-P – Oct18 is day of silence on SE Sep 1 at 2:25
2

My guess is that there are multiple problems with your tool. Also, because there are so many things you are unsure of, my guess you are missing quite a bit of information.

The first, and I am guessing, is that you are using some version of the historical record for these trades and that creates two types of problems.

The first is that the actual order of the transactions was not what you received as no one knows them. What you have are the transactions as reported and not as occurred. Large trades happen "off the tape" and are inserted into the record later when the responsible party for reporting believes it will not impact prices.

To give you an example, imagine I issue a buy order for 10,000 shares of ABC. It turns out that 100 trades are used to fill the order. You sell me 100 shares for 11 per share at 12:00. That trade will not appear anywhere on the tape at all.

What will happen is that at noon, your trade will not be seen. If there were another trade happening at about the same time, it might appear. If it were for 10.95, you might see a trade for 10.95, but your trade wouldn't appear. When all ten thousand shares are filled, the trade will be reported at the weighted average price. If the highest price paid was 11 and the other trade, the 10.95 was the second-highest, then the day's high price would be listed as 10.95. Your trade would have vanished into the block trade's average price. The block isn't always reported at the close of the trade. For example, if the responsible party believes the price will likely return to the weighted average price while the current price is far away, then the report of the trade can be held until later.

The tape is NOT a listing of what happened when.

The second problem is that your algorithm doesn't shift the supply and demand curves for liquidity costs. If you see a trade that was a buy for 11, but your algorithm has it as a sell, then it looks like you would get 11, but that was the ask, you would have received the bid. Likewise, if you were going to buy it would have to be at a price greater than 11 to outbid the other party that won the bid at 11. You are trading at the wrong prices. You haven't considered your impact on the supply and demand curves.

The third problem is that the time dimension of the market is 41 years. Forty-one years, based on spectral analysis, is the unit of time for a sample of one complete sequence of the spectrum of returns. Any sample shorter than 41 years is suspect. All kinds of weird temporary relationships can be found in any security that vanishes and never reappears. You are interested only in asymptotic relationships, not local ones. They are spurious.

In addition, you have ignored non-liquidity based trading costs such as your own brokerage commissions. The Wikipedia article is approximately correct on how shorting works but not precisely correct. It is a loose description and not one you should use for algorithm creation.

Finally, you are ignoring the risk of being the target of a merger or becoming bankrupt. You cannot assess that risk by viewing GOOG. You can only assess that risk by looking at similar firms and seeing under what circumstances another firm made them a target for purchase. You are also ignoring event risk. Since you have to look at other firms that have "events" to estimate the impact, you are ignoring those things that you have yet to see.

To understand, imagine you are considering providing car insurance on a 16-year-old. You use only their record. They have never had a wreck or any issues. The time series of events for them is all zeros. No events. Therefore insuring them is riskless so you insure them for a penny. After their first wreck, three-months into the period, you realize that your sample size of wrecks is one for $500. Therefore you determine they will have $2000 per year in wrecks. When they have no other wrecks, you conclude they will have $500 per year every year until they have one for $50,000.

No one would insure like that. You would use the record of all other actors.

You are ignoring all other securities and treating GOOG as though it were unique or had unique patterns.

Why?

1

You've provided insufficient information for any honest evaluation.

What I can tell you is that it is impossible that trading one share of GOOG every single day for the three month period starting on April 09,2019 would generate $1,000 in profit before commissions and borrow fees. With 100% accurate trade selection, not gonna happen.

If you believe that you have something of value, open a margin account with $2,000 and begin trading one share of GOOG every day. The proof is in the pudding.

0

If I have a tool to predict daily direction of stock price change

You can do all sorts of things with a time machine, yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.