-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.Rmd
125 lines (77 loc) · 5.92 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ichimoku <a href="https://shikokuchuo.net/ichimoku/" alt="ichimoku"><img src="man/figures/logo.png" alt="ichimoku logo" align="right" /></a>
<!-- badges: start -->
[![CRAN Status](https://www.r-pkg.org/badges/version/ichimoku?color=00008b)](https://CRAN.R-project.org/package=ichimoku)
[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fichimoku&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/ichimoku)
[![ichimoku status badge](https://shikokuchuo.r-universe.dev/badges/ichimoku?color=a4d1eb)](https://shikokuchuo.r-universe.dev/ichimoku)
[![R-CMD-check](https://github.com/shikokuchuo/ichimoku/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/shikokuchuo/ichimoku/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/shikokuchuo/ichimoku/graph/badge.svg)](https://app.codecov.io/gh/shikokuchuo/ichimoku)
[![DOI](https://zenodo.org/badge/367928545.svg)](https://zenodo.org/badge/latestdoi/367928545)
<!-- badges: end -->
Visualization and Tools for Ichimoku Kinko Hyo Strategies
An implementation of 'Ichimoku Kinko Hyo', also commonly known as 'cloud charts'. Static and interactive visualizations with tools for creating, backtesting and development of quantitative 'ichimoku' strategies. As described in Sasaki (1996, ISBN:4925152009), the technique is a refinement on candlestick charting, originating from Japan and now in widespread use in technical analysis worldwide. Translating as 'one-glance equilibrium chart', it allows the price action and market structure of financial securities to be determined 'at-a-glance'. Incorporates an interface with the OANDA fxTrade API <https://developer.oanda.com/> for retrieving historical and live streaming price data for major currencies, metals, commodities, government bonds and stock indices.
## Quick Start
```{r load}
library(ichimoku)
```
Simply `ichimoku()` and `plot()`:
```{r ichimoku}
cloud <- ichimoku(sample_ohlc_data, ticker = "TKR")
plot(cloud, window = "2020-05/")
```
<!-- alt="ichimoku kinko hyo" -->
`autostrat()` to automatically evaluate and rank top-performing strategies:
```{r auto}
autostrat(cloud, n = 3)
```
## Principal ichimoku functions
#### Data & Visualization
- [`ichimoku()`](https://shikokuchuo.net/ichimoku/reference/ichimoku.html) - to create an ichimoku object from price data.
- [`plot()`](https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html) / [`iplot()`](https://shikokuchuo.net/ichimoku/reference/iplot.html) - to plot (interactive) cloud charts from ichimoku objects.
- [`archive()`](https://shikokuchuo.net/ichimoku/reference/archive.html) - for reading/writing objects to/from archive files with data verification.
- [`oanda()`](https://shikokuchuo.net/ichimoku/reference/oanda.html) - to retrieve price data from the OANDA fxTrade API.
#### Strategies & ML
- [`strat()`](https://shikokuchuo.net/ichimoku/reference/strat.html) - to augment an ichimoku object with a strategy, including combined and asymmetric strategies.
- [`autostrat()`](https://shikokuchuo.net/ichimoku/reference/autostrat.html) - to automatically evaluate and rank top-performing strategies.
- [`mlgrid()`](https://shikokuchuo.net/ichimoku/reference/mlgrid.html) - to generate a numeric representation of the ichimoku cloud chart.
- [`relative()`](https://shikokuchuo.net/ichimoku/reference/relative.html) - to produce a statistical summary of the latest ichimoku numeric representation relative to historical values.
#### Real-time
- [`oanda_chart()`](https://shikokuchuo.net/ichimoku/reference/oanda_chart.html) - to plot real-time ichimoku cloud charts using OANDA data.
- [`oanda_studio()`](https://shikokuchuo.net/ichimoku/reference/oanda_studio.html) - a complete live analysis environment using OANDA data implemented in R Shiny.
- [`oanda_stream()`](https://shikokuchuo.net/ichimoku/reference/oanda_stream.html) / [`oanda_quote()`](https://shikokuchuo.net/ichimoku/reference/oanda_quote.html) - to obtain the latest live data stream / quote from the OANDA fxTrade API.
- [`oanda_view()`](https://shikokuchuo.net/ichimoku/reference/oanda_view.html) - for a market overview showing the relative performance of constituents.
- [`oanda_orders()`](https://shikokuchuo.net/ichimoku/reference/oanda_orders.html) / [`oanda_positions()`](https://shikokuchuo.net/ichimoku/reference/oanda_positions.html) - to retrieve the aggregate OANDA fxTrade order / position book.
## Vignettes
Long-form documentation links:
{ 1 } [Cloud Charts - The Reference Manual](https://shikokuchuo.net/ichimoku/articles/reference.html)
{ 2 } [Beyond Visualization - Quantitative Strategies](https://shikokuchuo.net/ichimoku/articles/strategies.html)
{ 3 } [Auxiliary Functions](https://shikokuchuo.net/ichimoku/articles/utilities.html)
{ 4 } [The OANDA fxTrade API](https://shikokuchuo.net/ichimoku/articles/xoanda.html)
## Installation
Install the latest release from CRAN or R-multiverse:
``` r
install.packages("ichimoku")
```
The current development version is available from R-universe:
``` r
install.packages("ichimoku", repos = "https://shikokuchuo.r-universe.dev")
```
## References
Sasaki, H. 佐々木 英信 (1996), *一目均衡表の研究 [ichimoku kinkouhyou no kenkyuu]*. Tokyo, Japan: Toushi Radar.
'OANDA' and 'fxTrade' are trademarks owned by OANDA Corporation, an entity unaffiliated with the ichimoku package.
--
◈ ichimoku R package: <https://shikokuchuo.net/ichimoku/>.
Listed CRAN Finance Task View: <https://cran.r-project.org/view=Finance>.
--
Please note that this project is released with a [Contributor Code of Conduct](https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms.