In: Computer Science
Excel
In Sell/Hold Column, use Logical function to determine whichstockshould sell or hold.For stock in either Financials or Communication Sector, have negative Correlation, listed in Hong KongStock Exchange and beta between 0.04 and 0.09,stock will set for “Sell”. Otherwise, stock will set for “Hold”
From whatever I have understood from this question is that any value between 0.04 and 0.09 should display as "Sell". Whatever values outside this value will display as "Hold". I'm considering that the value 0.04 and 0.09 is outside the range and hence any such value will display as "Sell".
The logic stays the same you can play around with the datas.
=IF(AND(A2>0.04,A2<0.09),"SELL","HOLD")
The above is the logical expression which compares the "Data" column with values.
IF((A2>0.04) && (A2<0.09))
{
PRINT SELL
}
else
PRINT HOLD
I have taken some sample data to verify the result as the question does not show clear information on the data sets
Let me know if I understood the question correctly and you have the desired result.
Thanks