DoddDisciple Posted January 23, 2014 Share Posted January 23, 2014 I'm pretty sure the number of people on here who use Screener.co, are familiar with the PROBM model, and can read SQL is close to null, but I might as well ask anyway. I came across this blogpost: http://quantatia.wordpress.com/2013/10/29/using-screener-co-to-implement-quant-value-screens/. It has a PROBM model in SQL, but I'm a little too dense to figure out how to slap a <= -2.2 at the end or some other quantity. Any help is appreciated. I'm not even sure if this covers LFY, TTM, or LFI. Here's the pesky logic in question: ((-4.84) +(0.92) *( CASE WHEN (((((accountsreceivablea/currencyexchangea) / ((totalrevenuea/currencyexchangea) /(365) )))) / ((((accountsreceivablea1/currencyexchangea1) / ((totalrevenuea1/currencyexchangea1) /(365) ))))) IS NULL THEN 1 ELSE (((((accountsreceivablea/currencyexchangea) / ((totalrevenuea/currencyexchangea) /(365) )))) / ((((accountsreceivablea1/currencyexchangea1) / ((totalrevenuea1/currencyexchangea1) /(365) ))))) END ) +(0.528) *( CASE WHEN (((((1) -(costofrevenuea1/currencyexchangea1) / (totalrevenuea1/currencyexchangea1)))) / ((((1) -(costofrevenuea/currencyexchangea) / (totalrevenuea/currencyexchangea))))) IS NULL THEN 1 ELSE (((((1) -(costofrevenuea1/currencyexchangea1) / (totalrevenuea1/currencyexchangea1)))) / ((((1) -(costofrevenuea/currencyexchangea) / (totalrevenuea/currencyexchangea))))) END ) +(0.404) *( (CASE WHEN ( ((1) – ((plantpropequipmenta/currencyexchangea) -(totalcurrentassetsa/currencyexchangea) ) /(totalassetsa/currencyexchangea) ) / ((1) – ((plantpropequipmenta1/currencyexchangea1) -(totalcurrentassetsa1/currencyexchangea1) ) /(totalassetsa1/currencyexchangea1) )) IS NULL THEN 1 ELSE ( ((1) – ((plantpropequipmenta/currencyexchangea) -(totalcurrentassetsa/currencyexchangea) ) /(totalassetsa/currencyexchangea) ) / ((1) – ((plantpropequipmenta1/currencyexchangea1) -(totalcurrentassetsa1/currencyexchangea1) ) /(totalassetsa1/currencyexchangea1) )) END ) ) +(0.892) *( (CASE WHEN ((totalrevenuea/currencyexchangea) / (totalrevenuea1/currencyexchangea1)) IS NULL THEN 1 ELSE ((totalrevenuea/currencyexchangea) / (totalrevenuea1/currencyexchangea1)) END) ) +(0.115) *( (CASE WHEN ( ((depreciationamortizationa1/currencyexchangea1) / ((depreciationamortizationa1/currencyexchangea1) +(plantpropequipmenta1/currencyexchangea1) ) ) / ((depreciationamortizationa/currencyexchangea) / ((depreciationamortizationa/currencyexchangea) +(plantpropequipmenta/currencyexchangea) ) )) IS NULL THEN 1 ELSE ( ((depreciationamortizationa1/currencyexchangea1) / ((depreciationamortizationa1/currencyexchangea1) +(plantpropequipmenta1/currencyexchangea1) ) ) / ((depreciationamortizationa/currencyexchangea) / ((depreciationamortizationa/currencyexchangea) +(plantpropequipmenta/currencyexchangea) ) )) END) ) -(0.172) *((CASE WHEN ( ((sgaexpensea/currencyexchangea) /(totalrevenuea/currencyexchangea) ) / ((sgaexpensea1/currencyexchangea1) /(totalrevenuea1/currencyexchangea1) )) IS NULL THEN 1 ELSE ( ((sgaexpensea/currencyexchangea) /(totalrevenuea/currencyexchangea) ) / ((sgaexpensea1/currencyexchangea1) /(totalrevenuea1/currencyexchangea1) )) END) ) -(0.327) * ((CASE WHEN ( ((totaldebta/currencyexchangea) /(totalassetsa/currencyexchangea) ) / ((totaldebta1/currencyexchangea1) /(totalassetsa1/currencyexchangea1) )) IS NULL THEN 1 ELSE ( ((totaldebta/currencyexchangea) /(totalassetsa/currencyexchangea) ) / ((totaldebta1/currencyexchangea1) /(totalassetsa1/currencyexchangea1) )) END)) +(4.679)*((CASE WHEN ( ((((nibx_ttm*1000000)/fincurrencyexchangerate)/pricingexchangerate) -(totaloperatingcashflowa/currencyexchangea) ) / (totalassetsa/currencyexchangea)) IS NULL THEN 1 ELSE ( ((((nibx_ttm*1000000)/fincurrencyexchangerate)/pricingexchangerate) -(totaloperatingcashflowa/currencyexchangea) ) / (totalassetsa/currencyexchangea)) END)) ) Link to comment Share on other sites More sharing options...
DoddDisciple Posted January 25, 2014 Author Share Posted January 25, 2014 I've tried this a few times and get this error: Status: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '– ((plantpropequipmenta/currencyexchangea) -(totalcurrentassetsa/currencyexcha' at line 1 If someone can get it to work and it's accurate, I'd be really thankful :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now