Hi everyone,

I was wondering if anyone could help me out with the following issue. I know it might be something very basic, but I have no idea how to do it:

When using the Research Notebook, I just have to run some basic code like this to get a nice DataFrame with the indicator values:

apo = AbsolutePriceOscillator(10,20,MovingAverageType.Simple)
apo_df = qb.Indicator(apo,spy,252,Resolution.Daily)
apo_df.head()

And I get something like this:

168098_1702418679.jpg

 

I could use this DataFrame to extract the signal, modify it, concatenate it with some other data, and maybe train an ML model.

How do I do the same in the QC Algorithm?

The method self.Indicator does not exist. I tried expanding the indicator's Window attribute to a large number (say 100) and I can access each value individually, by doing something like:

self.apo[90]

Or somethig along those lines of:

apo_values = []
for value in self.apo:
	apo.values.append(value)

But, ¿is there a way to just get a nice DataFrame from the start?

I'm thinking of using one or more indicators as features in an ML algorithm, but I'm basically stuck in this first step.

 

Thank you very much for any guidance!