Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (24 sloc) 1.14 KB
module Y2016.M10.D21.Exercise where
import Data.Map (Map)
import Analytics.Trading.Data.Row (Symbol) --
import Analytics.Trading.Scan.Top5s --
-- the below imports are available from 1HaskellADay git repository
import Graph.ScoreCard
import Y2016.M10.D19.Exercise (LeadersLosers)
Wow! Years, months, and days of exercises for 1HaskellADay. That's something.
Okay, enough musing! Onto today's problem.
Yesterday, you were able to convert the record of each day's top 5s stocks-by-
category into a record of, well, top5s by category, but in this case, it was a
category type -> stock-and-count
transformed from the original
date -> category -> (leaders stocks, losers stocks)
Today we (can) use what we did yesterday to transform the top5s stored at:
into a mapping of scorecards:
Symbol -> ScoreCard Symbol LeadersLosers Int
Let's do that.
top5s2ScoreCards :: FilePath -> IO (Map Symbol (ScoreCard Symbol LeadersLosers Int))
top5s2ScoreCards top5sfile = undefined
You can’t perform that action at this time.