Created
March 21, 2013 15:16
-
-
Save milktrader/5213832 to your computer and use it in GitHub Desktop.
When has the 10-year closed below 1.5% since 1962? Just a couple of compact lines of Julia will tell you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> using TimeSeries | |
julia> d = imfred("DGS10"); | |
julia> d[v(d) .< 1.5] | |
6-element TimeStamp Array: | |
2012-06-01 | 1.47 | |
2012-07-20 | 1.49 | |
2012-07-23 | 1.47 | |
2012-07-24 | 1.44 | |
2012-07-25 | 1.43 | |
2012-07-26 | 1.45 |
Not that anyone would do this on purpose mind you ...
> d[1,1]
DGS10
1962-01-02 4.06
> d[1,1] = 1.23
> d[1,1]
DGS10
1962-01-02 1.23
julia> d[1]
1962-01-02 | 4.06
julia> d[1].value = 1.23
ERROR: type TimeStamp is immutable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a little comparison with R ...