除了神经网络的方法,还有什么算法可以实现机器的训练和自我学习?

Discussion in 'Model and Algorithm' started by clmtw, Jul 6, 2009.

  1. 呵呵 股市期市汇市是非稳态(动态),但是市场也常有特定形态出现(棋局特定棋形做局入杀契机),可以归类形态模型交易。
     
  2. 非稳态和动态是两回事。:p
     
  3. 训练和学习的算法很多,关键是让机器学习什么,用什么样的数据去训练。
     
  4. 交易风格跟棋风一样,有人稳健型厚积薄发,有人激进型大刀阔斧
     
  5. "如果市场是非稳态的,能用一个量化指标来表达它的有效性吗?"

    市场的有效性是时变的,那也没有关系啊。用一个F(t)来表示好了。问题还是这样:有没有一个表征市场有效程度的度量?
     
  6. 开始我们在设计棋软时,重点之重把棋软引擎(主要计算是中局残局搏杀),单从代码运行速度很快,引擎是相当强了。但把原上百万局基础棋局库(大都布局库前30回合,手工归类录入)看淡了,没有把所有棋库的数据加入到软件中,影响到象软整体实力。

    如果交易系统有好的引擎,也不能少了历史数据的参考及人工修正。
     
  7. 你这样是用了一个函数来表达,而不是一个值。

    用函数来表达,应该是没有问题。如果你去计算过去200天的Hurst参数。显然,可以用移动的Hurst参数来表达市场有效性的变化。
     
  8. 当市场有效性强时,理论上,无论什么从历史数据中挖掘出来的模式都是没有用的。当有效性低时,就把你的模式去试一试。这也算是一种择时的手段吧。
     
  9. 出現未知模式,空倉的繼續空倉,有倉的止損。換個市場找舊情人,等機器把新模式調教熟了,再殺回來。
     
  10. 我觉得比较难的就是如何判断‘未知模式’,能否指点一下。
     
  11. 野禅师,为什么Hurst参数可以用来表示市场有效性?市场的有偏性和有效性(efficiency)没关系啊?
     
  12. 我觉得下面这篇文章还是比较中肯的。

    http://thismatter.com/money/investments/random-walk-efficient-market-hypotheses.htm

    Early in the past century, statisticians noticed that changes in stock prices seem to follow a fair game pattern. This has led to the random walk hypothesis, 1st espoused by French mathematician Louis Bachelier in 1900, which states that stock prices are random, like the steps taken by a drunk, and therefore are unpredictable.

    A few studies appeared in the 1930’s, but the random walk hypothesis was studied—and debated—intensively in the 1960’s. The current consensus is that the random walk is explained by the efficient market hypothesis.

    The efficient market hypothesis (EMH) states that financial markets are efficient and that prices already reflect all known information concerning a stock or other security and that prices rapidly adjust to any new information. Information includes not only what is currently known about a stock, but also any future expectations, such as earnings or dividend payments. It seeks to explain the random walk hypothesis by positing that only new information will move stock prices significantly, and since new information is presently unknown and occurs at random, future movements in stock prices are also unknown and, thus, move randomly. Hence, it is not possible to outperform the market by picking undervalued stocks, since the efficient market hypothesis posits that there are no undervalued or even overvalued stocks (otherwise, one could earn abnormal profits by selling short).

    The basis of the efficient market hypothesis is that the market consists of many rational investors who are constantly reading the news and react quickly to any new significant information about a security. There are also many funds whose managers are constantly reading new reports and news, and with the aid of high-speed computers, are constantly sifting through financial data looking for mispriced securities.

    To summarize, the efficient market hypothesis rests on the following predicates:

    •that information is widely available to all investors;
    •that investors use this information to analyze the economy, the markets, and individual securities to make trading decisions;
    •that most events that have a major impact on stock prices, such as labor strikes, major lawsuits, and accidents, are random, generally unpredictable events and when they do happen, they are quickly broadcast to investors;
    •and that investors will react quickly to any new information.
    There are 3 forms or levels of the efficient market hypothesis that differ in what information is considered.

    In the weak form, only past market trading information, such as stock prices, trading volume, and short interest are considered. Hence, even the weak form of the EMH implies that technical analysis can’t work, since technical analysis relies exclusively on past trading data to forecast future price movements.

    The semi-strong form extends the information to public information other than market data, such as news, accounting reports, company management, patents, products of the company, and analysts’ recommendations.

    The strong form extends the information further to include not only public information, but also private information, typically held by corporate insiders, such as officers and executives of the corporation. Obviously, corporate insiders can make abnormal profits by trading their company’s stock before a major corporate change is communicated to the public, which is why such insider trading is banned by the Securities and Exchange Commission (SEC). Corporate insiders can trade their stock, but only if the trade is not based on a major development that only a few people know, such as a merger, a new product line, or significant key appointments within the company.

    Random Walk and Brownian Motion
    In my opinion, the random walk of stocks and other securities is better explained by the same concept used to explain Brownian motion. Brownian motion, which is the random motion of small particles suspended in a fluid, was 1st observed by the botanist Robert Browning in 1827 as the random movement of pollen grains suspended in a liquid, and that this movement continued even for a liquid at equilibrium—in other words, the pollen grains continued to move randomly even though there was no evident force moving them. Albert Einstein provided a mathematical foundation to explain Brownian motion in 1905 as the result of the random molecular bombardment of the pollen grains—at any given time, the molecules bombarding the pollen grains on all sides are unbalanced, causing the grains to move one way, then another. Because the bombardment of the molecules was random, so was the resultant motion.

    So how does this apply to the stock market? Economists would say that stocks and other security prices are the result of the equilibrium of supply and demand—however, it is actually the instantaneous supply and demand that determines actual prices, and at any given time, the supply and demand will differ simply due to chance.

    For instance, suppose, on a particular day, that you have 100 investors who want to buy a particular stock and 100 investors who want to sell the same stock, and suppose further that they believe that the opening market price to be a fair price and they place market orders to effect their trades—and these traders are not aware of any news about the company during the course of the day. I think you will agree that there is very little chance that these traders will all come to market at the same time, even on the same day, and if some of them do happen to trade at the same time, the number of buyers and sellers probably will not be equal, and that whether there are more buyers than sellers or vice versa will differ throughout the day. Hence, at most times of the day, there will be an instantaneous imbalance of supply and demand for the stock, which will cause the stock price to move seemingly randomly throughout the day. I say seemingly, because even though the stock price is determined by the instantaneous supply and demand of the stock, no one can know what that equilibrium price will be ahead of time.

    The proof of this explanation can be observed by the fact that even when there is no news about a particular company, its stock will walk randomly throughout the day because the instantaneous supply and demand will vary randomly throughout the day.

    It is true that news moves the markets, and that this news is mostly unpredictable, at least by most traders—hence, some randomness will be created by news events. But even when there is news about a particular company that will move its stock price significantly, the response will still have some randomness, because different traders with different amounts of capital will learn about it at different times, and there will probably be limit and stop-loss orders triggered as the stock price changes significantly, thereby causing the stock to zigzag up or down. Furthermore, how much will the price move because of the news? Different traders will have different opinions as to how much the news is worth. If the news was good, for instance, then some traders will buy more because they believe that the stock price hasn’t reached its top; others will sell because they believe that the price has overshot its top, and these traders will trade at different times.

    Is the Efficient Market Hypothesis True?
    I have no reason to doubt the basic premises of the efficient market hypothesis, but is there another reasonable explanation as to why it is difficult to outperform the market? After all, how does the efficient market hypothesis explain the stock market bubble of the latter half of the 1990’s? If stock prices were simply the result of the total sum of all information about the companies and their stocks, then stock bubbles shouldn’t happen—but they do happen. In the late 90’s, it was evident that a bubble was forming because stock prices were growing much faster than the underlying companies—you don’t have to be an economist or an analyst to know that this could not continue, and that stock prices would eventually decline significantly.

    Some have argued that information only affects the changes in prices, not their level. The problem that I have with this argument is that the old information should continually be telling investors that stock prices have already overshot their intrinsic value or their true pricing, and that investors should’ve been selling since even good news can’t really overcome the fact that stock prices have soared much faster than the underlying businesses. But, alas, that isn’t what happened.

    What happened is that more and more people started piling into the stock market as it soared ever higher, thinking that it will go higher still—what Alan Greenspan has termed irrational exuberance. Indeed, the rest of the world joined in, buying stocks listed on the United States exchanges because they, too, expected the stock market to increase. I guess they thought they would be out of the market before it dropped. Some did get out at the top—that’s why the market started dropping. But most investors suffered significant losses.

    After the stock market bubble came the real estate bubble, as people believed that real estate couldn’t possibly decline in price—after all, they’re not making any more of the stuff as Will Rogers once quipped. But maybe rational investors should’ve paused, thinking: “Can real estate prices really continue to rise much faster than people’s incomes?” Or maybe these rational investors thought they would take advantage of the momentum and get out just before the market started falling. Some did get out before it fell, that’s why it started falling, but most investors suffered horrendous losses.

    Now some would argue that the smart money got out in time—the so-called rational investors posited in the efficient market hypothesis. And yet, it has come to light that the biggest banks, including the investment banks, have suffered so many losses that they had to be bailed out by the United States government in late 2008 or be taken over by healthier banks; otherwise, they would have suffered the fate of Lehman Brothers—bankruptcy! Many of these investors working for these banks were making huge bonuses, supposedly because they were the smart money. Although these banks didn’t directly buy real estate, they did invest in mortgage-backed securities and other derivatives based on mortgages, which they considered to be relatively safe. And yet, these were the very same banks that didn’t worry too much about the creditworthiness of their borrowers, since they could pass on the credit default risk to the buyers of the securitized loans—many of whom turned out to be other banks! Where is the rationality here?

    Then came the commodities bubble. A barrel of oil was priced above $147 in the summer of 2008, only to fall to less than $40 per barrel by December of the same year. Where is the efficiency here?

    Conclusion
    Although the efficient market hypothesis is a useful heuristic concept that may shed some light on trading and the markets, I believe that a more plausible reason to explain the inability of most investors to outperform the market, especially by active trading, is because there are so many factors affecting the prices of most investment products, that no one can know and quantify all of these factors to arrive at what the future price of anything will be.
     
  13. 是有点这个味道。不过至少还是给你解释了随机和有效的关系。
     
  14. 我的理解是,Hurst参数本身的前提就是否定市场是强有效或者充分有效的。所以用Hurst参数来衡量市场的有效性,似乎说不过去?
     
  15. Hurst 系数是一个用来检测时间序列的趋势性的方法。和市场是怎么回事没有关系。
     
  16. 如果股市指数具有时间序列上的趋势性,那市场就不是efficient的,至少是弱efficient,说明有一些信息没有及时priced in,也就是说TA是有效的(尤其是trend的概念),那些搞TA画trend的女同学,本质上和相信有效市场理论的教授是相互不能承认的,是这样理解,对吧?:D
     
  17. 个人觉得大部分的方法现在都很成熟,出来的效果差别应该是都是你能忍受的。追求几个百分点的进步,是写paper人干的事情。
    到是怎么准备数据,这个问题头大,这个问题涉及到对市场的本质认识上。
    不知道野狐禅大大是否同意?:D
     
  18. 我觉得原始数据是不该再“准备”了。除非那些数据有错误,譬如中国股票的 split 不除权。:D