AuthorJing Wu2018-07-20


Book-to-market ratio is used to find the value of a company by comparing the book value of a firm to its market value. The definition of the book-to-market ratio is

where is the common shareholders equity. Book value represents a company's assets minus its liabilities and sometimes is referred to as shareholders' equity. Price-to-Book Ratio is defined as

Therefore, we can see the Book-to-market ratio is the inverse of the P/B ratio. The book-to-market ratio suggests how much investors are paying against each dollar of book value in the balance sheet. The bigger the ratio is, the more fundamentally cheap is the investigated company. This algorithm will create the portfolio with this factor.


To construct the universe, first we eliminate stocks which don't have fundmental data. In the FineSelectionFunction, we calculate the market cap with PE ratio, earning per shares, and shares outstanding and assign the property MarketCap to each fine fundamental object. The universe is narrowed to top 20% companies with the highest market cap.

According to the algorithm, the portfolio is weighted based on market cap. We calculate the weight in the FineSelectionFunction and save them in self.weights.

fine = [x for x in fine if (x.ValuationRatios.PBRatio > 0)]
top_market_cap = sorted(fine, key = lambda x:x.MarketCap, reverse=True)[:int(len(fine)*0.2)]
top_bm = sorted(top_market_cap, key = lambda x: 1 / x.ValuationRatios.PBRatio, reverse=True)[:int(len(top_market_cap)*0.2)]
self.sorted_by_bm = [i.Symbol for i in top_bm]
total_market_cap = np.sum([i.MarketCap for i in top_bm])
self.weights = {}
for i in top_bm:
    self.weights[str(i.Symbol)] = i.MarketCap/total_market_cap
return self.sorted_by_bm

In the next step, we sort the stocks with the inverse of P/B ratio by descending order. Quintile portfolios are then formed based on the Book-to-Market ratio and the highest quintile is held for one year.


The portfolio underperforms relatively to the benchmark, S&P 500, during the backtest period.

In general, stocks that have a low B/P ratio are considered to be value stocks, and similarly, stocks that have a high B/P ratio are referred to as growth stocks.

During a bull market, which is associated with high GDP growth, value stocks tend to underperform growth stocks, as investors are optimistic about future earnings growth.


QuantConnect Logo

Try the world leading quantitative analysis platform today

Sign Up

Previous: Momentum Effect Combined with Term Structure in Commodities Next: Overnight Anomaly