Learn more about financial trading in R: https://www.datacamp.com/courses/financial-trading-in-r
Before introducing quantstrat, let's establish the reasons people trade, and what a trade is.
First and foremost, a trade is simply the act of buying or selling an asset--whether that's a financial security (such as a stock--that is, ownership of a company's equity, a bond--that is, ownership of a company's, or government's debt), or a tangible, physical product (such as commodities like gold, oil, metals, and corn).
This is done through converting cash (such as dollars) into ownership of this product, and either converting the product (such as shares in a company's stock) back into cash (hopefully for a profit), or actually taking delivery of a physical good (such as an oil company taking a shipment of crude oil for refinement).
While making a profit from acting on trading opportunities is one reason for trading, there are others. Certain companies whose business revolves around commodities enter the financial markets to protect themselves from the business impact of price movements of an underlying commodity (for example, Hershey's might want to establish a good price for chocolate, airlines want to minimize the impact the price movement of oil has on their business, and so on. For instance, if the price of oil rises too much and an airline doesn't protect itself against that, it would either have to raise ticket prices while its competitors don't, or make a lot less profit). Large financial institutions might want to increase or decrease their exposure to various sources of returns, and the riskiness that comes with them. At the heart of the matter is that financial instruments bear risk, and a payoff (allegedly) for bearing that risk. The aim of a systematic trading strategy is to make an educated guess as to when the ratio of reward to risk is favorable enough to bear the risk, and in turn, gain compensation, while not bearing that risk when the compensation is insufficient.
In terms of the mechanics of trading, there are essentially two types of trades. Divergence, also called momentum, or trend trading is the belief that a quantity will continue to increase or decrease if it has already been increasing or decreasing, respectively. A class of hedge funds known as "commodity trading advisors", or "CTAs" have made a lot of money on proper trend-following trading techniques. These classes of strategies are characterized by suffering small losses in trendless markets while making a great deal of money when a trend establishes.
The opposite style of trading is convergence, mean reversion, oscillation, or contrarian style trading. This type of trading philosophy is one that attempts to predict when a certain quantity will reverse direction. For instance, the famed Warren Buffett's value investing philosophy is one that buys companies after their price has suffered a considerable amount of depreciation, in the hopes that this price depreciation has mostly run its course and will reverse in the near future. Contrarian trading styles are classified by many small gains while suffering the occasional larger loss when entering a depreciating position too early.