human
Solve the following python programming problem given the following code:
# Custom Factor 1 : Dividend Yield
class Div_Yield(CustomFactor):

    inputs = [morningstar.valuation_ratios.dividend_yield]
    window_length = 1

    def compute(self, today, assets, out, d_y):
        out[:] = d_y[-1]
Given the above code, generate some markdown instructions for it.
assistant
#Here is the Python program you requested.

Traditional Value
In this notebook, we will develop a strategy based on the "traditional value" metrics described in the Lo/Patel whitepaper. The factors employed in this strategy designate stocks as either cheap or expensive using classic fundamental analysis. The factors that Lo/Patel used are:

Dividend Yield
Price to Book Value
Price to Trailing 12-Month Sales
Price to Trainling 12-Month Cash Flows

Dividend Yield
Dividend yield is calculated as:
$$Dividend\;Yield = \frac{Annual\;Dividends\;per\;share}{Price\;per\;share}$$
When a company makes profit, it faces a choice. It could either reinvest those profits in the company with an eye to increase efficiency, purchase new technology, etc. or it could pay dividends to its equity holders. While reinvestment may increase a company's future share price and thereby reward investors, the most concrete way equity holders are rewarded is through dividends. An equity with a high dividend yield is particularly attractive as the quantity of dividends paid to investors represent a larger proportion of the share price itself. Now we shall create a Dividend Yield factor using the Pipeline API framework and Morningstar's list of fundamental values.