Skip to content

Commit

Permalink
update readme example and manifest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dysonance committed Mar 20, 2019
1 parent a0c6816 commit 1579c29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ version = "0.8.0"

[[Indicators]]
deps = ["Random", "Statistics", "Temporal", "Test"]
git-tree-sha1 = "0734fc9e3c33f59bccea03e891ad36b2ce14e328"
git-tree-sha1 = "8502074e3967a914969cd139f15841fa0706479c"
uuid = "70c4c096-89a6-5ec6-8236-da8aa3bd86fd"
version = "0.4.0"
version = "0.5.0"

[[IniFile]]
deps = ["Test"]
Expand Down Expand Up @@ -118,9 +118,9 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Temporal]]
deps = ["Dates", "HTTP", "JSON", "Printf", "Random", "RecipesBase", "Statistics", "Test"]
git-tree-sha1 = "61d7059e2853e2f375629ca96e7272a4d7281b44"
git-tree-sha1 = "e46b146e40093cce858f6d730ba08877cee6d9a3"
uuid = "a110ec8f-48c8-5d59-8f7e-f91bc4cc0c3d"
version = "0.5.5"
version = "0.6.0"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ The key indicator used in this strategy is John Ehlers's MESA Adaptive Moving Av
This strategy simply goes long when the *MAMA* crosses over the *FAMA*, and goes short when the *FAMA* crosses over the *MAMA*. Below is an implementation that shows how to set default arguments to the `Indicators.mama` function and run a simple backtest using those parameters, and also define specified ranges over which we might like to see how the strategy behaves under different parameter sets.

```julia
using Strategems, Temporal, Indicators
using Dates
using Strategems, Indicators, Temporal, Dates

# define universe and gather data
assets = ["CME_CL1", "CME_RB1"]
assets = ["CHRIS/CME_CL1", "CHRIS/CME_RB1"]
universe = Universe(assets)
function datasource(asset::String; save_downloads::Bool=true)::TS
savedata_path = joinpath(dirname(pathof(Strategems)), "..", "data", "$asset.csv")
Expand Down Expand Up @@ -85,18 +84,6 @@ optimize!(strat, samples=0) # randomly sample the parameter space (0 -> use all

# cumulative pnl for each combination of the parameter space
strat.backtest.optimization
9801×3 Array{Float64,2}:
0.01 0.01 -3194.62
0.01 0.02 -4098.25
0.01 0.03 5178.82
0.01 0.04 6267.24
0.01 0.05 10996.5
0.99 0.95 -14949.8
0.99 0.96 -16431.6
0.99 0.97 -16333.3
0.99 0.98 -17081.7
0.99 0.99 -17057.4

# visualizing results with the Plots.jl package
using Plots
Expand Down

0 comments on commit 1579c29

Please sign in to comment.