Back to Community
Help on checking the logic

I would like to create a portfolio with the following criteria:

volatility = standard_deviation(5_year_close_price)  
median_free_cash_flow_per_share = median(5_year_free_cash_flow_per_share)  
std_free_cash_flow = standard_deviation(5_year_free_cash_flow)  
min_free_cash_flow = min(5_year_free_cash_flow)  
required_rate_of_return = market_sharpe * volatility

if (median_free_cash_flow/required_rate_of_return < current_price) and (std_free_cash_flow) <2 and (min_free_cash_flow) > 0:  
   buy  

Have I done it correctly in the research notebook?

And for FIO, the free cash flow is unusually high? What is the reason?

Loading notebook preview...