quantopian / alphalens

Performance analysis of predictive (alpha) stock factors
http://quantopian.github.io/alphalens
Apache License 2.0
3.2k stars 1.12k forks source link

ENH: convert event-based factors to continuous-time factors #348

Closed eigenfoo closed 4 years ago

eigenfoo commented 4 years ago

Alphalens expects alpha factors to be more or less continuous in time: in other words, if I produced a factor value for AAPL today, then usually, there should be a factor value for AAPL tomorrow, and it should be close to today's value.

However, some alpha factors are event-based and are much "spikier": in other words, perhaps I produce a factor value for AAPL only several times a year (perhaps driven by earnings call or some other similar event).

Would it be appropriate to have an event_based_signal_to_continuous_signal included in Alphalens? I imagine that event based signals could be forward-filled: the last valid value would be propagated forward in time until the next valid value, possibly with some user-specified exponential decay to encode the fact that event based signals reflect information that loses value in time. Is this something the maintainers would be interested in having?

luca-s commented 4 years ago

Actually Alphalens provides already an event based analysis. Have a look at the examples

Alphalens expects alpha factors to be more or less continuous in time: in other words, if I produced a factor value for AAPL today, then usually, there should be a factor value for AAPL tomorrow, and it should be close to today's value.

This limitation was fixed a long time ago