Comments (5)
/pingpong
is the main repo path. Package directories are camel cased, so you want to do
begin
import Pkg
Pkg.activate("/pingpong/PingPongInteractive") # or "/pingpong/PingPong"
using PingPongInteractive
end
from pingpong.jl.
I'd be pleased to help on this when I will understand PingPong.jl features.
Here is what I did to have a Pluto notebook running with PingPong and a Docker configuration (thanks to #19)
I created a custom/Dockerfile
file like so
FROM docker.io/panifie/pingpong-precomp-interactive
RUN julia -e 'using Pkg; Pkg.add("Pluto")'
ENTRYPOINT [ "julia", "-e", "using Pluto; Pluto.run(; host=\"0.0.0.0\")"]
I create a docker-compose.yml
like so
services:
pingpong:
#image: pingpong-precomp-interactive
build:
context: custom
dockerfile: Dockerfile
#restart: unless-stopped
volumes:
- ./user:/pingpong/user
ports:
- 127.0.0.1:1234:1234
I ran this container using
docker compose up
I looked at logs, browsed to http://127.0.0.1:1234/?secret=XXXXXX and created a new notebook with the following content
begin
import Pkg
# activate a temporary environment
#Pkg.activate(mktempdir())
Pkg.activate("/pingpong")
#Pkg.add("Term")
Pkg.instantiate()
end
unfortunately
using PingPong
raised
ArgumentError: Package PingPong not found in current path.
- Run `import Pkg; Pkg.add("PingPong")` to install the PingPong package.
from pingpong.jl.
Thanks @panbonker .
Can't understand why I didn't found that myself! Thanks
Here's a work in progress
# v0.19.41
using Markdown
using InteractiveUtils
# ╔═╡ 24d485ab-9bc8-4110-aaa4-cc084324efc3
begin
import Pkg
Pkg.activate("/pingpong/PingPongInteractive")
Pkg.instantiate()
end
# ╔═╡ b1830dda-6bc8-4f30-a36e-81406010dd58
begin
using PingPong
using Strategies: Strategies as st
using Scrapers: Scrapers as scr
using Data: Data as data
using SimMode: SimMode as sm
using Instruments: Instruments as ins
using Data: Data as da
end
# ╔═╡ 3ed5e59a-ca10-4a13-aa6d-41752b34f8f5
s = st.strategy(:Example) # `st` is the `Strategies` module
# ╔═╡ 74a70750-d11c-47da-b090-9567c541af68
begin
pairs = ins.raw.(s.universe.data.asset) # `ins` is the Instruments module
const bn = scr.BinanceData # `scr` is the Scrapers module
bn.binancedownload(pairs)
end
# ╔═╡ b616952e-7756-4918-b9e5-2e56879eaba2
let data = bn.binanceload(pairs)
da.stub!(s.universe, data) # `da` is the `Data` module
end
# ╔═╡ Cell order:
# ╠═24d485ab-9bc8-4110-aaa4-cc084324efc3
# ╠═b1830dda-6bc8-4f30-a36e-81406010dd58
# ╠═3ed5e59a-ca10-4a13-aa6d-41752b34f8f5
# ╠═74a70750-d11c-47da-b090-9567c541af68
# ╠═b616952e-7756-4918-b9e5-2e56879eaba2
but #33 is blocking
from pingpong.jl.
My opinion it that a very basic notebook with a simple strategy such as MA cross with one symbol, no margin should be written.
Ideally this strategy should be exchange independant and use simply daily data from an exchange which provide enough data.
from pingpong.jl.
you can pass a different exchange (and any other config) with st.strategy(:Example, exchange=:exc
but a real exchange is always necessary because there is tight integration with information which is exchange specific, like precision, limits, leverage tiers, fees...
if you really wanted, you could use an exchange built with an empty symbol (getexchange!(Symbol())
), try to run a backtest, and specialize functions with arbitrary default value until it stops throwing method errors...the exchange api is not well packed in one module currently
in absence of a specific exchange there are also api wrappers for coingecko/coinpaprika for getting ohlcv data
anyway I have updated the docs with the 1D strategy SimpleStrategy
from pingpong.jl.
Related Issues (20)
- Packages still missing precompiles HOT 1
- backtest interactivity
- strictier function signatures
- Missing functionalities
- Convert some Trality examples HOT 2
- things that I am not particularly happy about
- Profitability calculator
- Project status HOT 1
- UndefVarError: `scr` not defined HOT 1
- bn.binancedownload(pairs) raises ERROR: ArgumentError: No symbols found matching SubString{String}["BTC/USDT", "ETH/USDT", "SOL/USDT"] HOT 2
- Attempting to build a docker image under osx fails.
- Failed to install manually according to the official website documentation HOT 5
- load_ohlcv(s) : ERROR: UndefVarError: `compactun` not defined HOT 1
- [PingPongInteractive] ERROR: LoadError: UndefVarError: `za` not defined
- LoadError: Creating a new global in closed module `Main` (`resp`) breaks incremental compilation
- Several errors in Performance Metrics HOT 1
- [Stats.multi] ERROR: ArgumentError: column name :cum_balance not found in the data frame
- [Help] Python: AuthenticationError: binance {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."}
- Once again, missing keyword arguments in the function signature.
- bn.binanceload() load nothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pingpong.jl.