Skip to content

Commit

Permalink
stock-future dataset saved as transit-json
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Oct 15, 2024
1 parent d48cf3a commit 62b9731
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions dev/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{org.clojure/clojure {:mvn/version "1.11.3"}
io.github.clojure-quant/quanta-market {:mvn/version "0.1.115"} ; to load real data in backtest
io.github.clojure-quant/quanta-bar-warehouse {:mvn/version "0.1.2"} ; *bar-db* env
io.github.clojure-quant/techml-dataset-cljs {:mvn/version "0.1.15"} ; tmlds transit encoding
io.github.clojure-quant/quanta-trade {:local/root ".." :deps/manifest :deps}}
:aliases
{
Expand Down
1 change: 1 addition & 0 deletions dev/src/dev/demodata/roundtrips-stock-future.transit-json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["~#tech.v3.dataset",["^ ","~:metadata",["^ ","~:name","_unnamed"],"~:flavor","~:transit","~:version",1,"~:columns",[["^ ","^1",["^ ","^2","~:entry-idx","~:datatype","~:int64","~:n-elems",179],"~:missing",[],"~:data","AAAAAAAAAAARAAAAAAAAABEAAAAAAAAAEwAAAAAAAAAUAAAAAAAAABUAAAAAAAAAFgAAAAAAAAAWAAAAAAAAABYAAAAAAAAAFwAAAAAAAAAXAAAAAAAAABcAAAAAAAAAGAAAAAAAAAAcAAAAAAAAAB4AAAAAAAAAHwAAAAAAAAAiAAAAAAAAACYAAAAAAAAAKgAAAAAAAAAwAAAAAAAAAB0AAAAAAAAAIgAAAAAAAAAlAAAAAAAAACoAAAAAAAAALQAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMQAAAAAAAAAyAAAAAAAAADQAAAAAAAAANwAAAAAAAAA4AAAAAAAAADoAAAAAAAAAOgAAAAAAAAA7AAAAAAAAAD4AAAAAAAAAPgAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQQAAAAAAAABCAAAAAAAAAEU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AAAAAAAAoQAAAAAAAAChAAAAAAAAAKEAAAAAAAAAlQAAAAAAAAChAAAAAAAAAJQAAAAAAAAAmQAAAAAAAACTAAAAAAAAAJQAAAAAAAAAlAAAAAAAAACOAAAAAAAAAJQAAAAAAAAAmwAAAAAAAACcAAAAAAAAAJQAAAAAAAAAlQAAAAAAAACrAAAAAAAAAJoAAAAAAAAAmgAAAAAAAAChAAAAAAAAAJoAAAAAAAAAogAAAAAAAAChAAAAAAAAAJwAAAAAAAAAoQAAAAAAAACcAAAAAAAAAJwAAAAAAAAAoQAAAAAAAACjAAAAAAAAAKoAAAAAAAAAowAAAAAAAACjAAAAAAAAAKMAAAAAAAAAqwAAAAAAAACpAAAAAAAAAKQAAAAAAAAAqAAAAAAAAACqAAAAAAAAAKoAAAAAAAAAqQAAAAAAAACrAAAAAAAAAKsAAAAAAAAAuAAAAAAAAAC4AAAAAAAAALwAAAAAAAAAuAAAAAAAAAC4AAAAAAAAALgAAAAAAAAAuAAAAAAAAAC4AAAAAAAAALwAAAAAAAAAuAAAAAAAAAC8AAAAAAAAALYAAAAAAAAAvAAAAAAAAAC2AAAAAAAAALwAAAAAAAAAvAAAAAAAAACxAAAAAAAAALAAAAAAAAAAsAAAAAAAAACwAAAAAAAAALAAAAAAAAAArwAAAAAAAAC2AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALwAAAAAAAAAuAAAAAAAAACyAAAAAAAAALIAAAAAAAAAtgAAAAAAAAC2AAAAAAAAALwAAAAAAAAAuwAAAAAAAAC4AAAAAAAAALsAAAAAAAAAuAAAAAAAAAC4AAAAAAAAALsAAAAAAAAAuwAAAAAAAAC5AAAAAAAAAA=="],["^ ","^1",["^ ","~:categorical?",true,"^2","~:side","^8","~:keyword","^:",179],"^;",[],"^<",["~:long","^E","^E","^E","^E","^E","^E","^E","~:short","^E","^E","^F","^E","^E","^E","^F","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^F","^E","^E","^E","^E","^F","^E","^E","^E","^E","^E","^E","^E","^E","^E","^F","^E","^E","^E","^E","^F","^E","^F","^F","^E","^F","^E","^E","^F","^F","^E","^F","^F","^F","^E","^E","^F","^F","^E","^E","^E","^E","^F","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^E","^F","^E","^F","^F","^E","^E","^E","^E","^F","^E","^E","^E","^E","^E","^E","^E","^F","^E","^F","^E","^F","^F","^E","^E"]],["^ ","^1",["^ ","^2","~:qty","^8","^@","^:",179],"^;",[],"^<","AAAAAACIw0AAAAAAAFi7QAAAAAAAQH9AAAAAAACIw0AAAAAAAECfQAAAAAAAQI9AAAAAAACC5EAAAAAAAHC3QAAAAAAAQG9AAAAAAABAn0AAAAAAAECPQAAAAAAAQG9AAAAAAACC5EAAAAAAAILkQAAAAAAAguRAAAAAAABAb0AAAAAAAECPQAAAAAAAiNNAAAAAAACI40AAAAAAAGroQAAAAAAAQH9AAAAAAAAALkAAAAAAAAAuQAAAAAAAAARAAAAAAABAj0AAAAAAAABJQAAAAAAAiNNAAAAAAACIw0AAAAAAAECPQAAAAAAAQI9AAAAAAABAj0AAAAAAAAA0QAAAAAAAAARAAAAAAAAASUAAAAAAAAA5QAAAAAAAQI9AAAAAAABAf0AAAAAAAEB/QAAAAAAAQH9AAAAAAABAj0AAAAAAAEB/QAAAAAAAQJ9AAAAAAACC5EAAAAAAAECPQAAAAAAAQI9AAAAAAABAj0AAAAAAAAA5QAAAAAAAQI9AAAAAAABAj0AAAAAAAEB/QAAAAAAAQH9AAAAAAABwl0AAAAAAAIjDQAAAAAAAiMNA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TQBSuR+F6lFNAAAAAAABSgEAK16NwPQoFQA=="],["^ ","^1",["^ ","^B",true,"^2","~:asset","^8","~:string","^:",179],"^;",[],"^<",["^ ","~:strtable",["NG0","PLTR","AMZN","RIVN","FCEL","RB0","ZC0","GOOGL","MES0","MYM0","M2K0","FRC","WFC","DAX0","BZ0","INTC","MNQ0","NKLA"],"~:indexes","AAAAAAEAAAACAAAAAAAAAAMAAAAEAAAABQAAAAEAAAAGAAAAAQAAAAMAAAAGAAAABQAAAAUAAAAFAAAABgAAAAEAAAAAAAAAAAAAAAAAAAAHAAAACAAAAAgAAAAJAAAABwAAAAoAAAAAAAAAAAAAAAMAAAAHAAAABwAAAAgAAAAJAAAACAAAAAgAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAABQAAAAsAAAALAAAACwAAAAgAAAALAAAACwAAAAIAAAACAAAAAQAAAAAAAAAAAAAADAAAAAEAAAAAAAAAAAAAAAsAAAALAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAACwAAAAAAAAAAAAAACwAAAAAAAAAFAAAABQAAAAkAAAAFAAAACgAAAAoAAAAKAAAACgAAAAEAAAALAAAAAAAAAAoAAAALAAAAAQAAAAEAAAACAAAAAgAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAANAAAAAwAAAAMAAAADAAAAAgAAAA0AAAAAAAAAAQAAAAoAAAAAAAAAAAAAAA4AAAAAAAAADwAAAAAAAAAQAAAAAgAAAAIAAAAFAAAADgAAAA0AAAAOAAAAEAAAAA0AAAAOAAAADQAAAAAAAAAAAAAABgAAAAYAAAADAAAADQAAAAYAAAAGAAAABQAAAA4AAAAGAAAABgAAAAkAAAADAAAADgAAAA4AAAAOAAAAEQAAABEAAAAEAAAAEQAAABEAAAARAAAAEQAAABEAAAAEAAAAEQAAAAQAAAABAAAADwAAAAEAAAAPAAAABAAAAAMAAAANAAAABgAAAA0AAAANAAAABQAAAAEAAAAGAAAABgAAABAAAAAPAAAABgAAAA0AAAADAAAADQAAAAgAAAABAAAABQAAAAYAAAAFAAAABgAAAA4AAAAOAAAABgAAABEAAAA="]],["^ ","^1",["^ ","^2","~:exit-date","^8","^>","^:",179],"^;",[],"^<","gOw9kYYBAACAlFgLhgEAAIDwfhCGAQAAgOw9kYYBAACA8H4QhgEAAIDwfhCGAQAAgLw+KoYBAACA8H4QhgEAAIDwfhCGAQAAgJxxU4YBAACA+JdYhgEAAIB0izSGAQAAgLw+KoYBAACAGGUvhgEAAIDQsTmGAQAAgPiXWIYBAACAnHFThgEAAIDsPZGGAQAAgOw9kYYBAACA7D2RhgEAAIBc16WGAQAAgNSJAocBAACA1IkChwEAAIBsCTaHAQAAgFzXpYYBAACAXNelhgEAAICkipuGAQAAgFzXpYYBAACAcEq1hgEAAIBwSrWGAQAAgAjK6IYBAACA1IkChwEAAIBsCTaHAQAAgNSJAocBAACA1IkChwEAAID0VtmGAQAAgPRW2YYBAACArKPjhgEAAIAIyuiGAQAAgAjK6IYBAACA1IkChwEAAIDUiQKHAQAAgDCwB4cBAACA/G8hhwEAAID8byGHAQAAgPxvIYcBAACAtLwrhwEAAIC0vCuHAQAAgLS8K4cBAACAQOKXhwEAAIBA4peHAQAAgIiVjYcBAACAiJWNhwEAAICIlY2HAQAAgIiVjYcBAACAiJWNhwEAAICIlY2HAQAAgIiVjYcBAACAQOKXhwEAAIBA4peHAQAAgIiVjYcBAACAiJWNhwEAAICIlY2HAQAAgIiVjYcBAACAiJWNhwEAAIDku5KHAQAAgEDil4cBAACA5LuShwEAAIAMorGHAQAAgAyisYcBAACADKKxhwEAAID4LqKHAQAAgAyisYcBAACAIBXBhwEAAIB8O8aHAQAAgHj6RogBAACAePpGiAEAAIB4+kaIAQAAgHj6RogBAACAKC4JiAEAAIBI+9+HAQAAgJjHHYgBAACAePpGiAEAAIBI+9+HAQAAgCguCYgBAACAKC4JiAEAAIDMBwSIAQAAgMwHBIgBAACArDotiAEAAICsOi2IAQAAgJjHHYgBAACAmMcdiAEAAID07SKIAQAAgAhhMogBAACAePpGiAEAAIDUIEyIAQAAgIgs14gBAACAiCzXiAEAAICILNeIAQAAgDhgmYgBAACAiCzXiAEAAIDcOZSIAQAAgKj5rYgBAACAgBOPiAEAAIDcOZSIAQAAgNw5lIgBAACAtFN1iAEAAIDcOZSIAQAAgGBGuIgBAACAvGy9iAEAAIDcOZSIAQAAgDhgmYgBAACAIKwKiQEAAIAEILOIAQAAgAQgs4gBAACAiCzXiAEAAIAEILOIAQAAgORS3IgBAACAiCzXiAEAAIC8bL2IAQAAgIgs14gBAACAvGy9iAEAAIC8bL2IAQAAgIgs14gBAACAQHnhiAEAAIDEhQWJAQAAgEB54YgBAACAQHnhiAEAAIBAeeGIAQAAgCCsCokBAACAaF8AiQEAAICcn+aIAQAAgAw5+4gBAACAxIUFiQEAAIDEhQWJAQAAgGhfAIkBAACAIKwKiQEAAIAgrAqJAQAAgMyeTYkBAACAzJ5NiQEAAIA8OGKJAQAAgMyeTYkBAACAzJ5NiQEAAIDMnk2JAQAAgMyeTYkBAACAzJ5NiQEAAIA8OGKJAQAAgMyeTYkBAACAPDhiiQEAAIAUUkOJAQAAgDw4YokBAACAFFJDiQEAAIA8OGKJAQAAgDw4YokBAACASJIpiQEAAIDsaySJAQAAgOxrJIkBAACA7GskiQEAAIDsaySJAQAAgJBFH4kBAACAFFJDiQEAAIBIkimJAQAAgEiSKYkBAACASJIpiQEAAIA8OGKJAQAAgMyeTYkBAACApLguiQEAAICkuC6JAQAAgBRSQ4kBAACAFFJDiQEAAIA8OGKJAQAAgOARXYkBAACAzJ5NiQEAAIDgEV2JAQAAgMyeTYkBAACAzJ5NiQEAAIDgEV2JAQAAgOARXYkBAACAKMVSiQEAAA=="]]]]
27 changes: 19 additions & 8 deletions dev/src/dev/report/stock_future.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
[tick.core :as t]
[tablecloth.api :as tc]
[clojure.edn :as edn]
[quanta.trade.report.roundtrip :refer [roundtrip-stats]]))
[quanta.trade.report.roundtrip :refer [roundtrip-stats]]
[cquant.tmlds :refer [ds->transit-json-file]]))

;; load a roundtrip dataset from a file
;; the file has date as string, so we need to clean before using it.

(defn dt [sdt]
(-> sdt
t/date
(t/at (t/time "00:00:00"))))
(t/at (t/time "00:00:00"))
(t/instant)))

(defn clean [row]
(-> row
Expand Down Expand Up @@ -41,12 +43,18 @@
(-> (load-roundtrips)
print-table)

(def roundtrip-ds
(-> (load-roundtrips)
(tc/dataset)))

roundtrip-ds

(def report
(->> (load-roundtrips)
(tc/dataset)
(roundtrip-stats
{:fee 0.05 ; per trade in percent.
:equity-initial 100000.0})))
(roundtrip-stats
{:fee 0.05 ; per trade in percent.
:equity-initial 100000.0}
roundtrip-ds
))

(keys report)
;; => (:opts :roundtrip-ds :metrics)
Expand Down Expand Up @@ -94,7 +102,10 @@
(* 8648247.13744 0.05 0.01 2.0)
;; => 8648.247137440001


(ds->transit-json-file
roundtrip-ds
"src/dev/demodata/roundtrips-stock-future.transit-json")




Expand Down

0 comments on commit 62b9731

Please sign in to comment.