# Random Forest Prediction of IPO Underpricing
## 2 Materials and Methods
### Variables  
The starting point to study the phenomenon of IPO underpricing, the most prevalent target variable on IPO research, is providing a formal definition. IPO underpricing, \(R_{i}\), is defined in this paper as the percentage difference between the offer price and the closing price on the first trading day, adjusted for the market return:  
\[R_{i}=\left(\frac{Pc_{i}-Po_{i}}{Po_{i}}\right)-\left(\frac{Mc_{i}-Mo_{i}}{Mo_{ i}}\right)\]  
where \(Po_{i}\) represents the offering price for stock \(i\); \(Pc_{i}\) is the closing price for stock \(i\); \(Mo_{i}\) is the opening for the broad market index of the market where stock \(i\) was taken public for the day before the IPO and \(Mc_{i}\) is the closing for market index on the day of the IPO. For the purposes of this study, the relevant indices are the S&P 500, AMEX Composite Index, and NASDAQ Composite Index.  
As we have already discussed, the body of research on IPO initial returns is vast. The number of explanations and variables that have been postulated to explain the phenomenon is very wide. However, there is a set of independent variables concerning the structure of the offerings that show up in the literature very often. Among them, we relied on six that we will succinctly describe: width of the price range; offer price; price adjustment; relation to the tech sector; offering size; and retained stock.  
* Width of price range (RANGE): the width of the non-binding reference price range offered to potential investors during the roadshow has been traditionally considered to have a signaling effect. Wider ranges show uncertainty regarding the valuation of the company and, therefore, tend to be associated with riskier investments. Following [16; 17], this indicator will be defined as the difference between the maximum and minimum price, divided by the minimum.
* Offering price (PRICE): the final offering price is considered a key value, not only as a component of previous indicators, but in its own right. Studies such as [18; 19], among others, support the idea that price itself might be identified by potential buyers as a quality indicator.
* Price adjustment (P_AD): many studies such as [PERSON] [16], [PERSON] and [PERSON] [20], or [PERSON] and [PERSON] [21] show that relation between the initial tentative price range and the final offer price might be interpreted as a signal by investors. These authors suggest that this effect is likely to be captured the expression that follows: \[P_{ADJ}=\frac{\left|P_{f}-P_{e}\right|}{P_{e}}\] where \(P_{f}\) is the offer price and \(P_{e}\), the expected price, is the price at the middle of the non-binding reference range.
* Technology (TECH): companies whose industrial activities are related to the technology sector tend to show higher initial returns. This is usually controlled in the models by means of a dummy variable that equals one for tech companies and zero otherwise [22; 23; 24]. Our labeling criterion will be based on the definition used by IPO Monitor. This company classifies IPOs according the US Standard Industry Codes and activities reported by the companies in their filings. Hence, we will consider IPOs to be \"tech-related\" if IPO Monitor considers them so in their reports.
* Offering size (LSIZE): studies such as [19; 25; 26] defend the importance of including this factor in the models. The variable is defined as the logarithm of the size of the offering, in millions of dollars, excluding the over-allotment option.
* Retained stock (RETAINED): the amount of capital retained by initial investors has been traditionally interpreted as a signal of the quality of the stock, as it would reveal the confidence of insiders in the future of the company [21; 27]. Since we lack the breakdown of primary and secondary shares, this variable will be proxied by the ratio of the amount of shares sold at the IPO divided by the post-offering number of shares minus the shares sold at the IPO.