Skip to content

Commit

Permalink
Merge pull request #39 from vzhomeexperiments/dev_053
Browse files Browse the repository at this point in the history
Dev 053
  • Loading branch information
vzhomeexperiments authored Dec 18, 2021
2 parents 3a374d7 + fbc8a73 commit 1165ad3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 16 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ cran-comments.md
RunRStudio
^codecov\.yml$
^\.github$
^CRAN-SUBMISSION$
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: lazytrade
Type: Package
Title: Learn Computer and Data Science using Algorithmic Trading
Version: 0.5.2
Version: 0.5.3
Author: Vladimir Zhbanko
Maintainer: Vladimir Zhbanko <[email protected]>
Description: Provide sets of functions and methods to learn and practice data science using idea of algorithmic trading.
Expand All @@ -16,7 +16,7 @@ URL: https://vladdsm.github.io/myblog_attempt/topics/lazy%20trading/, https://gi
BugReports: https://github.com/vzhomeexperiments/lazytrade/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Imports:
readr,
stringr,
Expand All @@ -37,5 +37,5 @@ Suggests:
magrittr,
data.table,
bit64
Depends: R (>= 3.4.0)
Depends: R (>= 3.6.0)
Roxygen: list(markdown = TRUE)
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
* setup github actions
* add fail safe for function input parameters

# lazytrade 0.5.3

# Version 0.5.3

## Changes

* removed as.vector from example code to fix error in R-devel builds
* increased min R version to 3.6.0

# lazytrade 0.5.2

# Version 0.5.2
Expand Down
2 changes: 1 addition & 1 deletion R/util_profit_factor.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' summarise(PnL = sum(X5),
#' NumTrades = n(),
#' PrFact = util_profit_factor(X5)) %>%
#' select(PrFact) %>% head(1) %>% as.vector() %>% round(3)
#' select(PrFact) %>% head(1) %>% round(3)
#'
#'
util_profit_factor <- function(x){
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
# lazytrade

<!-- badges: start -->
[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhomeexperiments/lazytrade)
[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vzhomeexperiments/lazytrade)
[![CRAN status](https://www.r-pkg.org/badges/version/lazytrade)](https://CRAN.R-project.org/package=lazytrade)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/vzhomeexperiments/lazytrade/workflows/R-CMD-check/badge.svg)](https://github.com/vzhomeexperiments/lazytrade/actions)
Expand Down Expand Up @@ -113,7 +113,7 @@ rl_generate_policy(data_trades, states, actions, control)

## Example - generating passwords for trading platforms login

Multiple trading accounts require passwords, package contains function that may easily generate random passwords:
Multiple trading accounts require passwords, package contains function that may easily generate random passwords:

```{r message=FALSE, warning=FALSE}
library(lazytrade)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- badges: start -->

[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhomeexperiments/lazytrade)
[![codecov](https://codecov.io/gh/vzhomeexperiments/lazytrade/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vzhomeexperiments/lazytrade)
[![CRAN
status](https://www.r-pkg.org/badges/version/lazytrade)](https://CRAN.R-project.org/package=lazytrade)
[![Lifecycle:
Expand Down Expand Up @@ -159,7 +159,7 @@ library(readr)
#generate 8digit password for trading platform
util_generate_password(salt = 'random text')
#> .
#> 1 8a289ED5
#> 1 58e23E45
```

## Example - generate initialization files for MT4 platform
Expand Down Expand Up @@ -307,6 +307,9 @@ library(testthat)
#> The following object is masked from 'package:dplyr':
#>
#> matches
#> The following objects are masked from 'package:readr':
#>
#> edition_get, local_edition
#> The following objects are masked from 'package:magrittr':
#>
#> equals, is_less_than, not
Expand Down
10 changes: 4 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
## Test environments
* Docker Container, R 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Platform: x86_64-pc-linux-gnu (64-bit)
* R-hub builder
Platform: Debian Linux, R-devel, GCC
Platform: Windows Server 2022, R-devel, 64 bit
* Winbuilder
* R version 4.1.0 (2021-05-18)
* R Under development (unstable) (2021-06-18 r80528)
* R version 4.1.2 (2021-11-01)
* R Under development (unstable) (2021-12-14 r81376 ucrt)

## R CMD check results
Status: OK
R version R 4.1.0 (2021-05-18)
R version 4.1.2 (2021-11-01) -- "Bird Hippie"

There were no ERRORs or WARNINGs or NOTEs

Expand Down
2 changes: 1 addition & 1 deletion man/util_profit_factor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-util_profit_factor.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(lazytrade)
library(testthat)
library(magrittr)
library(dplyr)
Expand All @@ -15,7 +16,6 @@ test_that("test value of the calculation", {
PrFact = util_profit_factor(X5)) %>%
select(PrFact) %>%
head(1) %>%
as.vector() %>%
round(3)

expect_equal(DF_Stats$PrFact, 0.68)
Expand Down

0 comments on commit 1165ad3

Please sign in to comment.