Best buying price on stock marketing based on market depth detail (CSE atrad tool)
If you are buying your order will be placed in Bid list. If you are selling your order will be placed in the Ask list. The highest Bid price will be placed at the top of the Bid list and the lowest Ask price will be placed at the top of the Ask list. When a Bid and Ask price are matched a transaction will take place and it will the last traded price. If you are looking to buy at a lower price, say $155.01, your Bid price will be placed 3rd in the Bid list, and unless the Ask prices fall to that level, your order will remain in the list until it trades, it expires or you cancel it. If prices don't fall to you Bid price you will not get a trade. If you wanted your trade to go through you could either place a limit buy order closer to the lowest Ask price (however this is still not a certainty), or to be certain place a market buy order which will trade at the lowest Ask price. "When I first started working in finance I was given a rule of thumb to decide which price you will get in the market: ""You will always get the worst price for your deal, so when buying you get the higher ask price and when selling you get the lower bid price."" I like to think of it in terms of the market as a participant who always buys at the lowest price they can (i.e. buys from you) and sells at the highest price they can. If that weren't true there would be an arbitrage opportunity and free money never exists for long."
It's difficult to compile free information because the large providers are not yet permitted to provide bulk data downloads by their sources.  As better advertising revenue arrangements that mimic youtube become more prevalent, this will assuredly change, based upon the trend. The data is available at money.msn.com.  Here's an example for ASX:TSE.  You can compare that to shares outstanding here. They've been improving the site incrementally over time and have recently added extensive non-US data.  Non-US listings weren't available until about 5 years ago. I haven't used their screener for some years because I've built my own custom tools, but I will tell you that with a little PHP knowledge, you can build a custom screener with just a few pages of code; besides, it wouldn't surprise me if their screener has increased in power.  It may have the filter you seek already conveniently prepared. Based upon the trend, one day bulk data downloads will be available much like how they are for US equities on finviz.com.  To do your part to hasten that wonderful day, I recommend turning off your adblocker on money.msn and clicking on a worthy advertisement.  With enough revenue, a data provider may finally be seduced into entering into better arrangements.  I'd much rather prefer downloading in bulk unadulterated than maintain a custom screener. money.msn has been my go to site for mult-year financials for more than a decade.  They even provide limited 10-year data which also has been expanded slowly over the years. Yes apply for live and dynamic data (you may have to pay for this depending on your broker and your country) and look at the market depth. In the stock market many participants enter orders that are not necessarily set at the current market price of the stock (i.e. they are not market orders, they are limit orders). They can be lower than the market price (if they want to buy) or they can be higher than the market price (if they want to sell). The set of orders at each point of time for a security is called the order book. The lowest selling price of the order book is the offer or ask, the higher buying price is the bid. The more liquid is a security, the more orders will be in the order book, and the narrower will be the bid-ask spread. The depth of the order book is the number of units that the order book can absorb in any direction (buy or sell). As an example: imagine I want to buy 100 units at the lowest offer, but the size of the lowest offer is only 50 units, and there is not any further order, that means the stock has little depth. There is no such thing as buying at the best price. That only exists in hindsight. If you could consistently predict the lower bound, then you would have no reason to waste your time investing. Quit your job and bet with all leverage in. What if the price never reaches your lower bound and the market keeps rallying? What if today is crash day and you catch a falling knife? I'd say the best strategy would be just buy at whatever the market price is the moment your investment money hits your account with the smallest possible commission. Fundamental Analysis can be used to help you determine what to buy, but they won't give you an entry signal for when to buy. Technical Analysis can be used to help you determine when to buy, and can give you entry signals for when to buy. There are many Technical Indicator which can be used as an entry signal, from as simple as the price crossing above a moving average line and then selling when the price crosses back below the moving average line, to as complicated as using a combination of indicators to all line up for an entry signal to be valid. You need to find the entry signals that would suit your investing or trading and incorporate them as part of your trading plan. If you want to learn more about entry signals you are better off learning more about Technical Analysis. Here is one the links for Goldmansachs. Not to state the obvious, but most of their research is only available to their clients. http://www.goldmansachs.com/research/equity_ratings.html I also searched for some time before discovering Market Archive, which AFAIK is the most affordable option that basically gives you a massive multi-GB dump of data.  I needed sufficient data to build a model and didn't want to work through an API or have to hand-pick the securities to train from.  After trying to do this on my own by scraping Yahoo and using the various known tools, I decided my time was better spent not dealing with rate-limiting issues and parsing quirks and whatnot, so I just subscribed to Market Archive (they update the data daily). The best ask is the lowest ask, and the best bid is the highest bid.  If the ask was lower than the bid then they crossed, and that would be a crossed market and quickly resolved. So the bid will almost always be cheaper than the ask. A heuristic is that a bid is the revenue of the stock at any given time while the ask is the cost, so the market will only ever offer a profit to itself not to the liquidity seeker. If examining the book vertically, all orders are usually sorted descending. Since the best ask is the lowest ask, it is on the bottom of the asks, and vice versa for the best bid. The best bid & best ask will be those closest since that's the narrowest spread and price-time priority will promise that a bid that crosses the asks will hit the lowest ask, the best possible price for the bidder and vice versa for an ask that crosses the best bid. Technical Analysis in general is something to be cognizant of, I don't use a majority of studies and consider them a waste of time.  I also use quantitative analysis more so than technical analysis, and prefer the insight it gives into the market. The markets are more about predicting other people's behavior, psychology. So if you are trading an equity that you know retail traders love, retail traders use technical analysis and you can use their fabled channel reversals and support levels against them, as examples. Technical analysis is an extremely broad subject. So I suggest getting familiar, but if your historical pricing charts are covered in various studies, I would say you are doing it wrong. A more objective criticism of technical analysis is that many of the studies were created in the 1980s or earlier. Edges in the market do not typically last more than a few weeks. On the other side of that realization, some technical analysis works if everyone also thinks it will work, if everyone's charts say buy when the stock reaches the $90 price level and everyone does, the then stock will go higher. But the market makers and the actions of the futures markets and the actions of options traders, can undermine the collective decisions of retail traders using technical analysis. "I am strongly skeptical of this.  In fact, after reading your question, I did the following: I wrote a little program in python that ""simulates"" a stock by flipping a coin. Each time the coin comes up heads, the stock's value grows by 1. Each time the coin comes up tails, the stock's value drops by 1.  I then group, say, 50 of these steps into a ""day"", and for each day I look at opening, closing, maximum and minimum. This is then graphed in a candlestick chart.  Funny enough, those things look exactly like the charts analysts look at. Here are a few examples:    If you want to be a troll, show these to a technical analyst and ask them which of these stocks you should sell short and which of them you should buy. You can try this at home, I posted the code here and it only needs Python with a few extra packages (Numpy and Pylab, should both be in the SciPy package). In reply to a comment from JoeTaxpayer, let me add some more theory to this. My code actually performs a one-dimensional random walk. Now Joe in the comments says that an infinite number of flips should approach the zero line, but that is not exactly correct. In fact, there is a high chance to end up far from the zero line, because the expected distance from the start for a random walk with N steps is sqrt(N).  What does indeed approach the zero line is if you took a bunch of these random walks and then performed the average over those. There is, however, one important aspect in which this random walk differs from the stock market: The random walk can go down as far as it likes, whereas a stock has a bottom below which it cannot fall. Reaching this bottom means the company is bankrupt and gets removed from the market. This means that the total stock market, which we might interpret as a sum of random walks, does indeed have a bias towards upwards movement, since I'm only averaging over those random walks that don't go below a certain threshold. But you can really only benefit from this effect by being broadly diversified." The study of technical analysis is generally used (sometimes successfully) to time the markets. There are many aspects to technical analysis, but the simplest form is to look for uptrends and downtrends in the charts. Generally higher highs and higher lows is considered an uptrend.  And lower lows and lower highs is considered a downtrend.  A trend follower would go with the trend, for example see a dip to the trend-line and buy on the rebound. Whilst a bottom fisher would wait until a break in the downtrend line and buy after confirmation of a higher high (as this could be the start of a new uptrend). There are many more strategies dealing with the study of technical analysis, and if you are interested you would need to find and learn about ones that suit your investment styles and your appetite for risk. "What if everyone decided to sell all the shares at a given moment, let's say when the stock is trading at $40? It would fall to the lowest bid price, which could be $0.01 if someone had that bid in place. Here is an example which I happened to find online:  Notice there are orders to buy at half the market price and lower... probably all the way down to pennies.  If there were enough selling activity to fill all of those bids you see, then the market price would be the lowest bid on the screen.  Alternatively, the bid orders could be pulled (cancelled), which would also let the price free-fall to the lowest bid even if there were few actual sellers. Bid-stuffing is what HFT (high frequency trading) algorithms sometimes do, which some say caused the Flash Crash of May 2010.  The computers ""stuff"" bids into the order book, making it look like there is demand in order to trigger a market reaction, then they pull the bids to make the market fall.  This sort of thing happens all the time and Nanex documents it http://www.nanex.net/FlashCrash/OngoingResearch.html Quote stuffing defined: http://www.investopedia.com/terms/q/quote-stuffing.asp I remember the day of the Flash Crash very well.  I found this video on youtube of CNBC at that time.  Watch from the 5:00 min mark on the video as Jim Crammer talks about PG easily not being worth the price of the market at that time.  He said ""Who cares?"", ""Its not a real price"", ""$49.25 bid for 50,000 shares if I were at my hedge fund.""  http://www.youtube.com/watch?v=86g4_w4j3jU You can value a stock how you want, but its only actually worth what someone will give you for it. More examples: Anadarko Petroleum, which as we noted in today's EOD post, lost $45 billion in market cap in 45 milliseconds (a collapse rate of $1 billion per millisecond), flash crashing from $90 all the way to an (allegedly illegal) stub quote of $0.01. http://www.zerohedge.com/news/2013-05-17/how-last-second-flash-crash-pushed-sp-500-1667-1666 How 10,000 Contracts Crashed The Market: A Visual Deconstruction Of Last Night's E-Mini Flash Crash http://www.zerohedge.com/news/2012-12-21/how-10000-contracts-crashed-market-visual-deconstruction-last-nights-e-mini-flash-cr Symantec Flash-Crash Destroys Over $1.5 Billion In Less Than A Second http://www.zerohedge.com/news/2013-04-30/symantec-flash-crash-destroys-over-15-billion-less-second This sort of thing happens so often, I don't pay much attention anymore." "Unfortunately, there is very little data supporting fundamental analysis or technical analysis as appropriate tools to ""time"" the market. I will be so bold to say that technical analysis is meaningless. On the other hand, fundamental analysis has some merits. For example, the realization that CDOs were filled with toxic mortgages can be considered a product of fundamental analysis and hence provided traders with a directional assumption to buy CDSs. However, there is no way to tell when there is a good or bad time to buy or sell. The market behaves like a random 50/50 motion. There are many reasons for this and interestingly, there are many fundamentally sound companies that take large dips for no reason at all. Depending on your goal, you can either believe that this volatility will smooth over long periods and that the market has generally positive drift. On the other hand, I feel that the appropriate approach is to remain active. You will be able to mitigate the large downswings by simply staying small and diversifying  - not in the sense of traditional finance but rather looking for uncorrelated products. Remember, volatility brings higher levels of correlation. My second suggestion is to look towards products like options to provide a method of shaping your P/L - giving up upside by selling calls against a long equity position is a great example. Ground your trades with fundamental beliefs if need be, but use your tools and knowledge to combat risks that may create long periods of drawdown." That is true. You will not be able to reconstruct the value of the index from the data returned with this script.  I initially wrote this script because I wanted data for a lot of stocks and I wanted to perform PCA on the stocks currently included in the index. "Finding the ""optimal"" solution (and even defining what optimal is) would probably take a lot of searching of all the possible combinations of stocks you could buy, given that you can't buy fractional shares. But I'd guess that a simple ""greedy"" algorithm should get you close enough. For any given portfolio state, look at which stock is furthest below the target size - e.g. in your example, S3 is 3.5% away whereas S1 is only 3.1% away and S2 is over-sized. Then decided to buy one stock of S3, recalculate the current proportions, and repeat until you can't buy more stocks because you've invested all the money. If you have to pay a transaction fee for each kind of stock you purchase you might want to calculate this in larger lot sizes or just avoid making really small purchases."