JuliaStats / TimeSeries.jl

Time series toolkit for Julia
Other
352 stars 69 forks source link

Refactor methods #67

Closed milktrader closed 10 years ago

milktrader commented 10 years ago

@karbarcca @carljv

Ye Olde Umbrella Issue ...

Probably the best workflow is to create a branch calling it something along the lines timearrayrefactor and focus on that group of methods.

There are currently 65 tests that cover much of the functionality, but certainly more can be written. The mathematical operators tests for example are not exhaustive, and probably should be. I made the comparison operators exhaustive and discovered that I neglected a .<= method instead calling it a <= method.

I feel like the number of methods in the package is complete (covers 99% of time series related functionality) and fulfills the goal of being a lightweight package. Probably those in utilities can be removed (deprecated).

Ideas for other must-have methods?

Some notes about the testing framework

The testing framework uses the registered FactCheck package, and const objects from the un-registered MarketData package.

Pkg.clone("git://github.com/zachallaun/FactCheck.jl.git")
Pkg.clone("git://github.com/JuliaQuant/MarketData.jl.git")

Wait a minute, I thought you said FactCheck is registered? Well it is, but the package sha1 hasn't been bumped to METADATA for a few weeks, and the @runtest macro isn't available if the package is installed via Pkg.add(). More on this usage below.

julia> using TimeSeries, MarketData, FactCheck

# refactor some getindex methods in timearray

julia> @runtest TimeSeries timearray

type constructors enforce invariants

6 facts verified.

getindex methods

12 facts verified.

# okay, phew. Nothing broke. Let's check the entire suite of tests just to make sure

julia> @runtest TimeSeries all

type constructors enforce invariants

6 facts verified.

getindex methods

12 facts verified.

base element-wise operators on TimeArray values

15 facts verified.

timestamp operations

11 facts verified.

transformations

13 facts verified.

utilities

8 facts verified.

# yay, time to PR the branch! 

I'm going to rewrite the MarketTechnicals package to support the current implementation of TimeSeries, and then go on to writing a backtesting framework. There is also work to be done in TimeModels, if anyone is interested.

milktrader commented 10 years ago

Okay, we're up to 72 tests now. https://github.com/JuliaStats/TimeSeries.jl/pull/69

milktrader commented 10 years ago

Updated the file list to reflect the new organization

milktrader commented 10 years ago

Closing this because it's too umbrella-ish (of course, it did admit to that when it opened)