“SyntaxError: invalid syntax” : &gt , &lt, … replacement code?

Keywords: python-3.x

Question: 

I'm coding in Python 3 a crossover strategy for trading MSFT, I have input the following code and I'm getting a syntax error. Can you tell me what the correct code should be?

I've tried changing &gt to > and &lt to < but I still get the error.

set desired number of points as threshold for spread difference and create column containing strategy 'Stance'

X = 50
MSFT['Stance'] = np.where(MSFT['short_ma-long_ma']&gt;X,1,0)
MSFT['Stance'] = np.where(MSFT['short_ma-long_ma']&lt;X,-1,     
MSFT['Stance'])
MSFT['Stance'].value_counts()  

I expect a set desired number of points as threshold for spread difference ("short_ma-long_ma") and to create a column containing strategy 'Stance'.

Answers: