Attached is a simple algorithm to get you started. It buys five securities with the highest PE ratios on the NYSE each month (and sells any other positions).
Take a look at the documentation for how to set up pipelines https://www.quantopian.com/tutorials/pipeline
The first step is to define a pipeline to get all the data you need and perhaps filter to a subset of securities based on that data. In this case I used the fundamental data "valuation_ratios.pe_ratio" and "share_class_reference.exchange_id" from Morningstar (see https://www.quantopian.com/data/morningstar/fundamentals the available fields are here https://www.quantopian.com/help/fundamentals )
The second step is to run the pipeline (typically in the "before_trading_start" function) which then gets the data and applies any filters you have defined.
Finally, use that data to place your orders.
Take a look at https://www.quantopian.com/data for all the available data you have at your disposal. Individual fields in those datasets can easily be made into factors to use in your pipeline. Simply use the ".latest" method (see https://www.quantopian.com/help#sample-earnings-risk for an example)
Good luck.