Skip to content

Instantly share code, notes, and snippets.

@milktrader
Created January 12, 2014 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milktrader/8385338 to your computer and use it in GitHub Desktop.
Save milktrader/8385338 to your computer and use it in GitHub Desktop.
Lazy and Series
julia> using Lazy, Series, MarketData
julia> head(cl)
1-element Array{SeriesPair{Date{ISOCalendar},Float64},1}:
1980-01-03 105.220
julia> @> cl value log diff cumsum expm1 x -> x+1 x -> x[size(x,1)]
1.1647025280364955
@milktrader
Copy link
Author

Here is annualized return, but not sure how to pass 505 in so this is hard-coded

julia> @> cl value log diff cumsum expm1 x->x+1 x->x[size(x,1)] x->x^(252/505) x->x-1
0.07905094554845449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment