[WSS20] Persistent Homology

13 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

1 Like

Hi Andrew
I am trying to apply Persistent Homology to stocks.
Trying the example below I get an error message but clicking on that message or searching for the strong does not show any answers as to how to resolve. The examples show using point cloud data while stocks are time series. Do I need to perform some transformation first in an interim step?
Thank you
regards
Warren

data = FinancialData["SBUX", "Close", {{2013, 1, 1}, {2013, 12, 1}, "Week"}, Method -> "WDF"]

ph = ResourceFunction["PersistentHomology"][data]

Error message is
Syntax
:Expression "ResourceFunction[PersistentHomology][data] has no closing ].

From the documentation

works for any dataset where the ei are numerical lists of the same
length.

FinancialData returns {DateObject, Quantity}. One way to convert to numerical

numerical = Normal@data /. {d_, v_} :> {UnixTime@d, QuantityMagnitude@v}

But

ResourceFunction["PersistentHomology"][numerical]

seems to hang at “Reducing Boundary Matrix” 6 / 8

Thank you - I get similar errors Rohit.