Tangible Book Value per Share
((Assets - liabilities - intangible assets) / common shares outstanding)
Book Value per Share
((Assets - liabilities) / common shares outstanding)
An algorithm that trades stocks with the highest book value per share values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -66.95%
import quantopian.algorithm as algo from quantopian.pipeline import Pipeline from quantopian.pipeline.filters import Q3000US from quantopian.pipeline.data.morningstar import Fundamentals as ms import quantopian.optimize as opt import numpy as np import pandas as pd def initialize(context): context.FINE_FILTER = 5 context.stock_weights = pd.Series() algo.attach_pipeline(make_pipeline(context), 'pipeline') schedule_function( stocks_weights, date_rules.week_start(), time_rules.market_open() ) schedule_function( trade, date_rules.week_start(), time_rules.market_open() ) def make_pipeline(context): univ = Q3000US() factor = ms.book_value_per_share.latest.rank(mask=univ, ascending=False) top = factor.top(context.FINE_FILTER) pipe = Pipeline( columns={'top': top}, screen=univ) return pipe def stocks_weights(context, data): df = algo.pipeline_output('pipeline') rule = 'top' stocks_to_hold = df.query(rule).index stock_weight = 1.0 / context.FINE_FILTER context.stocks_weights = pd.Series(index=stocks_to_hold, data=stock_weight) def trade(context, data): target_weights = opt.TargetWeights(context.stocks_weights) constraints = [] constraints.append(opt.MaxGrossExposure(1.0)) order_optimal_portfolio( objective=target_weights, constraints=constraints )
Book Value Yield
((Assets - liabilities) / close price)
An algorithm that trades stocks with the highest book value yield values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -81.77%
factor = ms.book_value_yield.latest.rank(mask=univ, ascending=False)
Cash Return
((Cash flow operations - capital expenditures) / enterprise value)
An algorithm that trades stocks with the highest cash return values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -90.42%
factor = ms.cash_return.latest.rank(mask=univ, ascending=False)
Earning Yield
((Diluted earnings / common shares outstanding) / close price)
An algorithm that trades stocks with the highest earning yield values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -98.6%
factor = ms.earning_yield.latest.rank(mask=univ, ascending=False)
Enterprise Value to EBITDA
((Common equity + preferred equity + minority equity + total debt - cash and cash equivalents) / net income - (interest + tax + deprecation + amortization))
An algorithm that trades stocks with the highest enterprise value to EBITDA values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -74.49%
factor = ms.ev_to_ebitda.latest.rank(mask=univ, ascending=False)
Free Cash Flow Yield
((Cash flow operations - capital expenditures / common shares outstanding) / close price)
An algorithm that trades stocks with the highest free cash flow yield values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -92.66%
factor = ms.fcf_yield.latest.rank(mask=univ, ascending=False)
Price to Book Ratio
(Close price / (assets - liabilities))
An algorithm that trades stocks with the highest price to book ratio values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -96.45%
factor = ms.pb_ratio.latest.rank(mask=univ, ascending=False)
Price to Earnings Ratio
(Close price / (net income / common shares outstanding))
An algorithm that trades stocks with the highest price to earnings ratio values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -86.27%
factor = ms.pe_ratio.latest.rank(mask=univ, ascending=False)
Price to Sales Ratio
(Close price / (revenue / common shares outstanding))
An algorithm that trades stocks with the highest price to sales ratio values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -58.17%
factor = ms.ps_ratio.latest.rank(mask=univ, ascending=False)
Sales Yield
((Revenue / common shares outstanding) / close price)
An algorithm that trades stocks with the highest sales yield values weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -75.64%
factor = ms.sales_yield.latest.rank(mask=univ, ascending=False)
Sustainable Growth Rate
(Net income / total common equity * (1 - dividend per share / diluted earnings per share))
An algorithm that trades stocks with the highest sustainable growth rate percentages weekly.
Starting capital: $10,000
Max leverage: 1
Jan 2, 2006 - Sep 1, 2020
Drawdown: -64.75%
factor = ms.sustainable_growth_rate.latest.rank(mask=univ, ascending=False)
1. Tangible Book Value per Share Investopedia
2. Book Value per Share Investopedia
3. Earning Yield Investopedia
4. Enterprise Value to EBITDA Investopedia
5. Free Cash Flow Yield Investopedia
6. Price to Book Ratio Investopedia
7. Price to Earnings Ratio Investopedia
8. Price to Sales Ratio Investopedia
Statements on this website are for informational purposes only and do not constitute a recommendation or advice by the website owner to transact any security or market instrument. All trading activity involves known and unknown risk. Historical data presented is not always indicative of future performance.