legacy-wiki
Stocks
Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.
symbols
prices
- http://stackoverflow.com/questions/6796988/python-get-stock-information-for-a-company-for-a-range-of-dates
- http://code.activestate.com/recipes/576495-get-a-stock-historical-value-from-google-finance/
sql schema
-
http://stackoverflow.com/questions/1523576/database-schema-for-organizing-historical-stock-data
-
table layout
-
Symbol - char 6
-
Date - date
-
Time - time
-
Open - decimal 18, 4
-
High - decimal 18, 4
-
Low - decimal 18, 4
-
Close - decimal 18, 4
-
Volume - int
-
notes
-
All trading instruments are stored in a single table. We also have a clustered index on symbol, date and time columns.
-
For daily data, we have a separate table and do not use the Time column. Volume datatype is also bigint instead of int.
-
We track splits and dividends on a daily basis and delete and then bulk insert data for every symbol that needs to be changed.
-
We purchased all of our historical market data from the Kibot web site: http://www.kibot.com/
statistics
glossary
exchange
volume
- http://www.swing-trade-stocks.com/stock-chart-volume.html
- volume is the number of shares traded during a given time period
- A surge in volume can often signify the end of a trend.
- The only time volume is useful is when you combine it with price.
- Expansion of range and high volume - If a stock is drifting along sideways in a narrow range and all of sudden it breaks to the upside with an increase in range and volume, then we can conclude that there is increased interest in the stock and it will probably continue higher.
- Narrow range and high volume - If a stock has very high volume for today but the range is narrow then this is called churning. In this case, significant accumulation or distribution is taking place.
- price action is the most important factor on a chart.
Short selling
In short selling, the trader borrows stock (usually from his brokerage which holds its clients’ shares or its own shares on account to lend to short sellers) then sells it on the market, hoping for the price to fall. The trader eventually buys back the stock, making money if the price fell in the meantime and losing money if it rose. Exiting a short position by buying back the stock is called covering a short position. This strategy may also be used by unscrupulous traders in illiquid or thinly traded markets to artificially lower the price of a stock. Hence most markets either prevent short selling or place restrictions on when and how a short sale can occur. The practice of naked shorting is illegal in most (but not all) stock markets.
Margin buying
In margin buying, the trader borrows money (at interest) to buy a stock and hopes for it to rise. Most industrialized countries have regulations that require that if the borrowing is based on collateral from other stocks the trader owns outright, it can be a maximum of a certain percentage of those other stocks’ value. In the United States, the margin requirements have been 50 % for many years (that is, if you want to make a $1000 investment, you need to put up $500, and there is often a maintenance margin below the $500).