Core Algorithm for Successful algorithmic trading

Algorithmic trading applications can be very complex. Once core concept can provide a method to understand the core problem. This concept is that, for each data point in time series data, a ranking must be established between any assets under consideration for buying or selling. For example, time series data may be analyzed at intervals of 5 minutes. For a market, there are many possible asssets to buy and their prices change constantly. Every 5 minutes, data is gathered that gives the current price of every asset in the market. The algorithm then runs to analyze this data. The simplicity of this concept can be that this evaluation that occurs every 5 minutes does not need to take into consideration any external states, such as the current balance of a person's assets. Within a market, a very important concept is the concept of opportunity cost. This is applicable for investing because when one asset is purchased, this means that other assets are not purchased. Every asset that is able to be purchased is always in a competition with other assets. For example, a person may buy one asset that has good performance, and increases by 10% in one year. The person may feel that this was a very good investment but it is still necessary to compare this with other assets because there could have been another asset that had an increase in value of 150% in one year. Because of the opportunity cost of buying an asset, an algorithmic trading application must always attempt to rank the strength of assets in the market at that time. Once an algorithm can determine a ranking of assets, at a specific time, the task of buying and selling assets is easy. The only thing it must do, at that point, is to perform a reallocation of the portfolio to match this ranking. Based on this info, an example algorithm could be: Filter out assets for which it is very obvious that the asset is currently having bad performance. For example, assets that have quickly lost value. For the remaining assets, that were not filtered out in step number 1, determine a ranking that will rank the assets from strongest to weakest at that moment. Rebalance the portfolio based on the outcome of step number 2. For example, the algorithm could purchase the 5 assets that were ranked highest.