Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Use function sqrt(), floor() in the algorithm

I just started to use Quantopian. And I'm trying to use some math function like sqrt(), floor() in my algo, but it cannot recognize the function.

May I know how to use these function?

Thanks!

2 responses

Try importing the Python math module, and then use math.sqrt() & math.floor(). Note that the Python numpy module is also available.

Got it, thanks.