Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Beginner troubles with fundamentals.

Hi everyone.

I've just started using quantopian and I have some troubles with fundamental data. My goal was to use different of these fundamentals (like roe or roa...) to get a list of interesting companies in which we can invest.

So the thing is that I don't quite know how to use the fundamentals listed here : https://www.quantopian.com/help/fundamentals#fundamentals-overview

Do I have to use the "custom factor" to introduce it in a pipeline ? If someone can guide me a bit it would be great !

Thanks !

7 responses

Hi,

It depends whether you just need the latest value of the fundamental or you need to access previous fundamental's data.

In the first case, simply use:

Fundamentals.operation_ratios.roa.latest

In the second, you will have to build a customfactor

Hi Diego,

If you do:

from quantopian.pipeline.data import Fundamentals  

You can then ‘tab’ your way to something like:

roa = Fundamentals.roa.latest  

Have a look at the documentation, I find it quite useful.

Do I need to import some module/package to use this "Fundamentals.operation_ratios.roa.latest" ?

Thanks !!!

Yes you do. See my above response.

oh thanks I wrote my anwer before reading yours !

Anyway thank you to both of you. I manage to do something quite useful for my first algorithm in quantopian !

HI Diego,

Here's a sample algo to get you started.

@Blue Robin I am trying to build an algorithm that uses multiple factors (p/e, RoA, debt, p/b, etc). I ran this algorithm to get a starting template - but I get this error.

Can anyone please help?

TypeError: MaximizeAlpha() expected a value with dtype 'float64' or 'int64' for argument 'alphas', but got 'object' instead.  
There was a runtime error on line 229.  

Is there a current example of using multiple fundamental factors?