Is there any algorithm to calculate highest possible return on stock market?
Highest possible is meaningless.  Ex: Use 17x Leverage on E-mini S&P 500 Futures, perfectly long before an uptick and short before a downtick every minute. Goes to the moon in a day of 1,440 minutes.  You are supposed to use a Buy-and-Hold SPY, with leverage that makes the Standard Deviation of SPY same as your Portfolio/Algorithm, as benchmark. You can statistically estimate the maximal loss/gain over a period of time T by the highest loss/gain during any of the same length time intervals in during the life of the stock. Using logarithmic prices to be more accurate.
How can you correlate a company stock's performance with overall market performance. No you can't. There is no simple magic formulae that will result in profits. There are quite a few statistical algorithms that specialists have built, that work most of the times. But they are incorrect most of the times as well. "Simply put, you cannot deterministically beat the market. If by being informed and following all relevant news, you can arrive at the conclusion that company A will likely outperform company B in the future, then having A stocks should be better than having B stocks or any (e.g., index based) mix of them. But as the whole market has access to the very same information and will arrive at the same conclusion (provided it is logically sound), ""everybody"" will want A stocks, which thus become expensive to the point where the expected return is average again.  Your only options of winning this race are to be the very first to have the important information (insider trade), or to arrive at different logical conclusions than the rest of the world (which boils down do making decisions that are not logically sound - good luck with that - or assuming that almost everybody else is not logically sound - go figure)." Any time you are optimizing a portfolio, the right horizon to use for computing the statistics you will use for optimization (expected return, covariance, etc.) will be the same as your rebalance/trading frequency.  If you expect your trading strategy to trade once a day, you should use daily data for optimization.  Ditto for monthly or quarterly.  If at all possible you should use statistics across the board that are computed at the same frequency as your trading. Regarding currency pricing, I see no reason you can't take the reported prices and convert them to whatever currency you want using that day's foriegn exchange rate.  Foreign exchange rates are available for free at the Fed and elsewhere.  Converting prices from one currency to another is not rocket science. Since you are contemplating putting actual money behind this, note that using data to compute statistics is less reliable for lower statistical moments.  The mean (expected return) is the first moment, so using historical returns is extremely unreliable at predicting future returns.  The variances and covariances are second moments, they are better.  Skewness and kurtosis, yet better.  The fact that the expected return can't reliably be estimated from past returns is the major downfall of the Markowitz method (resulting portfolios are often very crazy and will depend critically on the data period you use to set them up).   There are approaches to fixing this, such as Black-Litterman's (1992) method, but they get complicated fast. Okay, how good is my programmed test going to be if I'm new to trading? I thought the biggest flaw to algorithm trading is the people that write the code?  I am still trying to develop my own sense of swing reading with significant structure, price action, and other technicals. I was going to use the click-by-click, ninjatrader method to see what works best.   So, between your answer and my question. If I was going to buy data, from what stocks would be the best data to mine. L? "the ""how"" all depends on your level of computer savvy. Are you an Excel spreadsheet user or can you write in programming languages such as python? Either approach have math functions that make the calculation of ROI and Volatility trivial. If you're a python coder, then look up ""pandas"" (http://pandas.pydata.org/) - it handles a lot of the book-keeping and downloading of end of day equities data. With a dozen lines of code, you can compute ROI and volatility." "I would change that statement to ""very few people can CONSISTENTLY beat the market "". Successful strategies will get piled into and reduce returns. Markets will pick up inefficiencies, but at the same time they do exists. Tons of interesting reading especially in regards to value. Is there a risk premium that we don't know for value? Or is it a market behavior thing?" "The professional financial advisors do have tools which will take a general description of a portfolio and run monte-carlo simulations based on the stock market's historical behavior. After about 100 simulation passes they can give a statistical statement about the probable returns, the risk involved in that strategy, and their confidence in these numbers.  Note that they do not just use the historical data or individual stocks. There's no way to guarantee that the same historical accidents would have occurred that made one company more successful than another, or that they will again. ""Past performance is no guarantee of future results""... but general trends and patterns can be roughly modelled. Which makes that a good fit for those of us buying index funds, less good for those who want to play at a greater level of detail in the hope of doing better. But that's sorta the point; to beat market rate of return with the same kind of statistical confidence takes a lot more work." "If i do this, I would assume I have an equal probability to make a profit or a loss. The ""random walk""/EMH theory that you are assuming is debatable. Among many arguments against EMH, one of the more relevant ones is that there are actually winning trading strategies (e.g. momentum models in trending markets) which invalidates EMH.  Can I also assume that probabilistically speaking, a trader cannot do worst than random? Say, if I had to guess the roll of a dice, my chance of being correct can't be less than 16.667%. It's only true if the market is truly an independent stochastic process. As mentioned above, there are empirical evidences suggesting that it's not.  is it right to say then that it's equally difficult to purposely make a loss then it is to purposely make a profit?  The ability to profit is more than just being able to make a right call on which direction the market will be going. Even beginners can have a >50% chance of getting on the right side of the trades. It's the position management that kills most of the PnL." "My master's thesis was on using genetic algorithms and candle stick method.  If you are familiar, the AI was used to answer questions like ""what is a long day"", which is not formally defined in most candle stick texts.   So in theory unlimited potential for learning including teaching machines to learn.  Wall street pays pretty well for such developers, and if you are young and single man Manhattan is pretty sweet place to be. In practicality your formula for building wealth is the same as everyone else's:  get out of debt, build an emergency fund, and invest.  Initially invest in growth stock mutual funds through a 401K (assuming US)." Outside of software that can calculate the returns:  You could calculate your possible returns on that leap spread as you ordinarily would, then place the return results of that and the return results for the covered call position side by side for any given price level of the stock you calculate, and net them out. (Netting out the dollar amounts, not percentage returns.)  Not a great answer, but there ya go. Software like OptionVue is expensive In my experience thanks to algorithmic trading the variation of the spread and the range of trading straight after a major data release will be as random as possible, since we live in an age that if some pattern existed at these times HFT firms would take out any opportunity within nanoseconds. Remember that some firms write algorithms to predict other algorithms, and it is at times like those that this strategy would be most effective. With regards to my own trading experience I have seen orders fill almost €400 per contract outside of the quoted range, but this is only in the most volatile market conditions. Generally speaking, event investing around numbers like these are only for top wall street firms that can use co-location servers and get a ping time to the exchange of less than 5ms. Also, after a data release the market can surge/plummet in either direction, only to recover almost instantly and take out any stops that were in its path. So generally, I would say that slippage is extremely unpredictable in these cases( because it is an advantage to HFT firms to make it so ) and stop-loss orders will only provide limited protection. There is stop-limit orders( which allow you to specify a price limit that is acceptable ) on some markets and as far as I know InteractiveBrokers provide a guaranteed stop-loss fill( For a price of course ) that could be worth looking at, personally I dont use IB.  I hope this answer provides some helpful information, and generally speaking, super-short term investing is for algorithms. "I read the book, and I'm willing to believe you'd have a good chance of beating the market with this strategy - it is a reasonable, rational, and mechanical investment discipline. I doubt it's overplayed and overused to the point that it won't ever work again. But only IF you stick to it, and doing so would be very hard (behaviorally). Which is probably why it isn't overplayed and overused already. This strategy makes you place trades in companies you often won't have heard of, with volatile prices. The best way to use the strategy would be to try to get it automated somehow and avoid looking at the individual stocks, I bet, to take your behavior out of it. There may well be some risk factors in this strategy that you don't have in an S&P 500 fund, and those could explain some of the higher returns; for example, a basket of sketchier companies could be more vulnerable to economic events. The strategy won't beat the market every year, either, so that can test your behavior. Strategies tend to work and then stop working (as the book even mentions). This is related to  whether other investors are piling in to the strategy and pushing up prices, in part.  But also, outside events can just happen to line up poorly for a given strategy; for example a bunch of the ""fundamental index"" ETFs that looked at dividend yield launched right before all the high-dividend financials cratered. Investing in high-dividend stocks probably is and was a reasonable strategy in general, but it wasn't a great strategy for a couple years there. Anytime you don't buy the whole market, you risk both positive and negative deviations from it. Here's maybe a bigger-picture point, though. I happen to think ""beating the market"" is a big old distraction for individual investors; what you really want is predictable, adequate returns, who cares if the market returns 20% as long as your returns are adequate, and who cares if you beat the market by 5% if the market cratered 40%. So I'm not a huge fan of investment books that are structured around the topic of beating the market. Whether it's index fund advocates saying ""you can't beat the market so buy the index"" or Greenblatt saying ""here's how to beat the market with this strategy,"" it's still all about beating the market. And to me, beating the market is just irrelevant. Nobody ever bought their food in retirement because they did or did not beat the market. To me, beating the market is a game for the kind of actively-managed mutual fund that has a 90%-plus R-squared correlation with the index; often called an ""index hugger,"" these funds are just trying to eke out a little bit better result than the market, and often get a little bit worse result, and overall are a lot of effort with no purpose. Just get the index fund rather than these. If you're getting active management involved, I'd rather see a big deviation from the index, and I'd like that deviation to be related to risk control: hedging, or pulling back to cash when valuations get rich, or avoiding companies without a ""moat"" and margin of safety, or whatever kind of risk control, but something. In a fund like this, you aren't trying to beat the market, you're trying to increase the chances of adequate returns - you're optimizing for predictability. I'm not sure the magic formula is the best way to do that, focused as it is on beating the market rather than on risk control. Sorry for the extra digression but I hope I answered the question a bit, too. ;-)" "I don't know really is the best investment strategy. People think that they have to know everything to make money. But realistically, out of the hundreds of thousands of publicly traded securities, you really can only invest in a tiny number of them. Of the course of a week, you literally have more than a million ""buy"" or ""don't buy"" decisions, because the prices of those securities fluctuate every day.  Simply due to the fact that there are so many securities, you cannot know what everything is going to do. You have to say ""I don't know"". Also, when you do understand something, it is usually fairly priced. So will you make money on it? ""I don't know"". Only very rarely will you find something that you actually understand well and it is significantly undervalued. You can be looking at a company a day for two years before you find it. But people get trigger happy. They bet on 51%/49% odds when they should only bet on 90%/10% odds or higher.  If you are forced to bet on everything, it makes sense that you bet on everything you believe is greater than 50% chance of winning. But since you cannot bet on everything, you should only bet on the highest quality bets, those with greater than 90% chance of winning. To find such a bet, you may have to shuffle through 100 different companies and only make 2-3 bets. You are looking for something that is at least 2 standard deviations away from the mean.  People are not good at doing a lot of work, most of which yields nothing, to find one big payoff. They are wired to only look at the present, so they take the best bet they can see at the moment, which is often barely above 50% (and with any misjudgment, it may actually be well below 50%). And people are not good at understanding compound/geometric growth. You can keep multipling 10% gains (1.10 * 1.10 * 1.10 ...), but that can all be wiped out by multiplying by one zero, which is why taking a 51%/49% bet is so dangerous (even though technically it is an advantageous one). They forget to adjust for the geometric aspect of compounding. A 99%/1% bet is one you should take, but if you are allowed to repeat it and you keep going all-in, you will eventually lose and have $0, which is the same as if you took a single all-in bet that has 0% chance of winning.  As Buffett says, if you are only allowed to make 20 investments over a lifetime, you will most likely do better because it prevents you from making many of these mistakes." Unfortunately I believe there is not a good answer to this because it's not a well posed problem.  It sounds like you are looking for a theoretically sound criteria to decide whether to sell or hold.  Such a criteria would take the form of calculating the cost of continuing to hold a stock and comparing it to the transactions cost of replacing it in your portfolio. However, your criteria for stock selection doesn't take this form.  You appear to have some ad hoc rules defining whether you want the stock in your portfolio that provide no way to calculate a cost of having something in your portfolio you don't want or failing to have something you do want.  Criteria for optimally rebalancing a portfolio can't really be more quantitative than the rules that define the portfolio. "I interned for about six months at a firm that employed a few technical analysts, so I'll try to provide what little information I can. Since the bulk of the intra-day trading was decided algorithmically, technical analysts had two main functions: This basically boils down to my answer to your question. There are still enough people, trading firms, etc. who believe in candlestick charting and other visually subjective patterns that if you notice a trend, pattern, etc. before the majority of traders observing, you may be able to time the market successfully and profit. This is becoming increasingly dangerous, however, because of the steps I outlined above. Over time, the charting patterns that have been proven effective (often in many firms individually since the algorithms are all proprietary) are incorporated into computer algorithms, so the ""traders"" you're competing with to see the pattern are increasingly low-latency computer clusters less than a few blocks from the exchange. Summary: Candlestick charting, along with other forms of subjective technical analysis, has its believers, and assuming enough of these believers trade the standard strategies based on the standard patterns, one could conceivably time the market with enough skill to anticipate these traders acting on the pattern and therefore profit. However, the marginal benefits of doing so are decreasing rapidly as computers take over more trading responsibility.  Caveats:  I know you're in Australia, where the market penetration of HF/algo traders isn't as high as in the US, so it might be a few more years before the marginal benefits cease to be profitable; that being said, if various forms of technical analysis proved wildly profitable in Australia, above and beyond profits available in other markets, rest assured that large American or British trading firms would already have moved in.  My experience is limited to one trading firm, so I certainly can't speak for the industry as a whole. I know I didn't address candlestick charts specifically, but since they're only one piece of visual technical analysis, I tried to address the issue as a whole.  This somewhat ties into the debate between fundamental or technical analysis, which I won't get into. Investopedia has a short article on the subject. As I said, I won't get into this because while it's a nice debate for small traders, at large trading firms, they don't care; they want to make profit, and any strategy that can be vetted, whether it's fundamental, technical, or astrological, will be vetted.  I want to add more information to my answer to clear up some of the misconceptions in the comments, including those talking about biased studies and a lack of evidence for or against technical analysis (and candlestick charts; I'll explore this relationship further down).  It's important to keep in mind that charting methods, including candlestick charts, are visually subjective ways of representing data, and that any interpretations drawn from such charts should, ideally, represent objective technical indicators. A charting method is only as good as the indicators it's used to represent. Therefore, an analysis of the underlying indicators provides a suitable analysis for the visual medium in which they're presented.  One important study that evaluates several of these indicators is Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation by Lo, Mamaysky, and Wang. Lest anyone accuse its authors of bias, I should point out that not only is it published by the National Bureau of Economic Research (a highly reputable organization within economics and finance), but also that the majority of its authors come from MIT's Sloan school, which holds a reputation second to none. This study finds that several technical indicators, e.g. head-and-shoulder, double-bottom, and various rectangle techniques, do provide marginal value. They also find that although  human judgment is still superior to most computational algorithms in the area of visual pattern recognition, ... technical analysis can be improved by using automated algorithms Since this paper was published in 2000, computing power and statistical analysis have gained significant ground against human ability to identify and exploit for visual pattern detection like candlestick charts.  Second, I suggest you look into David Aaronson's book, Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals. He finds similar results to the Lo, et. al. paper, in that some technical indicators do add value to the investment process, but those that do are those that can be represented mathematically and thus programmed directly into trading algorithms (thus bypassing visual tools like candlestick charts).  He describes how studies, including Lo, et al., have found that head and shoulders patterns are worse than random, i.e. you would earn higher returns if you simply traded at random. That point is worth than repeating. If a day-trader is using a candlestick chart and using head-and-shoulders patterns as part of their toolkit, he's rolling the dice when he uses that pattern and returns that come from its application come from chance. This reminds me of that old story about a company that sends out pamphlets predicting the results of sports games, complete with ""strategies"" and ""data"" to back up the predictions. The company sends out several versions of the pamphlet every game, each predicting a different winner. Given a large enough sample size, by the end of the season, there are a few people who have received a pamphlet that accurately predicted the winner for every game and they're convinced the system is perfect. The others weren't so lucky, however. Relying on candlestick charts and TA patterns that are relics from the pre-computerized era is reassuring to some traders and gives them a sense of control and ""beating the market,"" but how long will chance remain on your side? This is why I maintain that visual tools like candlestick charts are a slowly dying medium. They certainly still add value to some trading firms, which is why Bloomberg terminals still ship with this functionality built in, but as more and more research shows, automated algorithms and statistical indicators can provide more value. It's also important to think about whether the majority of the value added by visual tools like candlestick charts comes in the form of profit or a sense of security to traders who learned the field using them over the past few decades.  Finally, it's extremely important to realize that the actions of retail investors in the equities market cannot begin to represent the behaviors of the market as a whole. In the equities markets alone, trading firms and institutional investors dwarf retail investors, and the difference in scale is even more vastly pronounced in derivatives and currency markets. The fact that some retail investors use candlestick charts and the technical indicators they (hope) underlie them provides nothing but minor anecdotal evidence as to their effectiveness."