Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/Aqua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Aqua

on:
push:
branches:
- main
tags: ["*"]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- uses: actions/checkout@v5
- name: Aqua
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="Aqua"))
Pkg.develop(PackageSpec(path=pwd()))
using PortfolioOptimisers, Aqua
Aqua.test_ambiguities(PortfolioOptimisers)
Aqua.test_unbound_args(PortfolioOptimisers)
Aqua.test_undefined_exports(PortfolioOptimisers)
Aqua.test_project_extras(PortfolioOptimisers)
Aqua.test_stale_deps(PortfolioOptimisers)
Aqua.test_piracies(PortfolioOptimisers)
Aqua.test_persistent_tasks(PortfolioOptimisers)
Aqua.test_deps_compat(PortfolioOptimisers)
43 changes: 43 additions & 0 deletions .github/workflows/AquaonPRs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Aqua on PRs

on:
pull_request:
branches:
- main
paths:
- "src/**"
- "test/**"
- "ext/**"
- "examples/**"
- "*.toml"
types: [opened, synchronize, reopened]

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- uses: actions/checkout@v5
- name: Aqua
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="Aqua"))
Pkg.develop(PackageSpec(path=pwd()))
using PortfolioOptimisers, Aqua
Aqua.test_ambiguities(PortfolioOptimisers)
Aqua.test_unbound_args(PortfolioOptimisers)
Aqua.test_undefined_exports(PortfolioOptimisers)
Aqua.test_project_extras(PortfolioOptimisers)
Aqua.test_stale_deps(PortfolioOptimisers)
Aqua.test_piracies(PortfolioOptimisers)
Aqua.test_persistent_tasks(PortfolioOptimisers)
Aqua.test_deps_compat(PortfolioOptimisers)
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PortfolioOptimisers"
uuid = "e0036ec9-05e5-505d-a6a9-07af41c94861"
authors = ["Daniel Celis Garza <daniel.celis.garza@gmail.com>"]
version = "0.1.0"
version = "0.2.0"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![All Contributors](https://img.shields.io/github/all-contributors/dcelisgarza/PortfolioOptimisers.jl?labelColor=5e1ec7&color=c0ffee&style=flat-square)](#contributors)
[![BestieTemplate](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/JuliaBesties/BestieTemplate.jl/main/docs/src/assets/badge.json)](https://github.com/JuliaBesties/BestieTemplate.jl)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

## How to Cite

Expand Down
19 changes: 19 additions & 0 deletions docs/src/api/13_Prior/01_BasePrior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Base Prior

```@docs
LowOrderPrior
HighOrderPrior
prior(pr::PortfolioOptimisers.AbstractPriorEstimator, rd::ReturnsResult; kwargs...)
prior(pr::PortfolioOptimisers.AbstractPriorResult, args...; kwargs...)
clusterise(cle::ClusteringEstimator, pr::PortfolioOptimisers.AbstractPriorResult; kwargs...)
PortfolioOptimisers.AbstractPriorEstimator
PortfolioOptimisers.AbstractLowOrderPriorEstimator
PortfolioOptimisers.AbstractLowOrderPriorEstimator_A
PortfolioOptimisers.AbstractLowOrderPriorEstimator_F
PortfolioOptimisers.AbstractLowOrderPriorEstimator_AF
PortfolioOptimisers.AbstractLowOrderPriorEstimator_A_AF
PortfolioOptimisers.AbstractLowOrderPriorEstimator_F_AF
PortfolioOptimisers.AbstractLowOrderPriorEstimator_A_F_AF
PortfolioOptimisers.AbstractHighOrderPriorEstimator
PortfolioOptimisers.AbstractPriorResult
```
7 changes: 7 additions & 0 deletions docs/src/api/13_Prior/02_EmpiricalPrior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Empirical Prior

```@docs
EmpiricalPrior
prior(pe::EmpiricalPrior{<:Any, <:Any, Nothing}, X::AbstractMatrix, args...; dims::Int = 1,
kwargs...)
```
7 changes: 7 additions & 0 deletions docs/src/api/13_Prior/03_FactorPrior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Factor Prior

```@docs
FactorPrior
prior(pe::FactorPrior, X::AbstractMatrix, F::AbstractMatrix; dims::Int = 1,
kwargs...)
```
9 changes: 9 additions & 0 deletions docs/src/api/13_Prior/04_HighOrderPrior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# High Order Prior

```@docs
HighOrderPriorEstimator
prior(pe::HighOrderPriorEstimator, X::AbstractMatrix,
F::Union{Nothing, <:AbstractMatrix} = nothing; dims::Int = 1, kwargs...)
PortfolioOptimisers.block_vec_pq
PortfolioOptimisers.dup_elim_sum_matrices
```
2 changes: 1 addition & 1 deletion docs/src/api/13_Prior/10_EntropyPoolingPrior.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prior
# Entropy Pooling

```@docs
PortfolioOptimisers.replace_prior_views
Expand Down
5 changes: 0 additions & 5 deletions docs/src/api/13_Prior/1_BasePrior.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/1_Getting_Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "MeanRisk\n opt | JuMPOptimiser\n | pe | EmpiricalPrior\n | | ce | PortfolioOptimisersCovariance\n | | | ce | Covariance\n | | | | me | SimpleExpectedReturns\n | | | | | w | nothing\n | | | | ce | GeneralWeightedCovariance\n | | | | | ce | SimpleCovariance: SimpleCovariance(true)\n | | | | | w | nothing\n | | | | alg | Full()\n | | | mp | DefaultMatrixProcessing\n | | | | pdm | Posdef\n | | | | | alg | UnionAll: NearestCorrelationMatrix.Newton\n | | | | denoise | nothing\n | | | | detone | nothing\n | | | | alg | nothing\n | | me | SimpleExpectedReturns\n | | | w | nothing\n | | horizon | nothing\n | slv | Solver\n | | name | Symbol: :clarabel1\n | | solver | UnionAll: Clarabel.MOIwrapper.Optimizer\n | | settings | Dict{String, Bool}: Dict{String, Bool}(\"verbose\" => 0)\n | | check_sol | @NamedTuple{allow_local::Bool, allow_almost::Bool}: (allow_local = true, allow_almost = true)\n | | add_bridges | Bool: true\n | wb | WeightBounds\n | | lb | Float64: 0.0\n | | ub | Float64: 1.0\n | bgt | Float64: 1.0\n | sbgt | nothing\n | lt | nothing\n | st | nothing\n | lcs | nothing\n | lcm | nothing\n | cent | nothing\n | gcard | nothing\n | sgcard | nothing\n | smtx | nothing\n | sgmtx | nothing\n | slt | nothing\n | sst | nothing\n | sglt | nothing\n | sgst | nothing\n | sets | nothing\n | nplg | nothing\n | cplg | nothing\n | tn | nothing\n | te | nothing\n | fees | nothing\n | ret | ArithmeticReturn\n | | ucs | nothing\n | | lb | nothing\n | sce | SumScalariser: SumScalariser()\n | ccnt | nothing\n | cobj | nothing\n | sc | Int64: 1\n | so | Int64: 1\n | card | nothing\n | scard | nothing\n | nea | nothing\n | l1 | nothing\n | l2 | nothing\n | ss | nothing\n | strict | Bool: false\n r | Variance\n | settings | RiskMeasureSettings\n | | scale | Float64: 1.0\n | | ub | nothing\n | | rke | Bool: true\n | sigma | nothing\n | rc | nothing\n | alg | SOCRiskExpr()\n obj | MinimumRisk()\n wi | nothing\n fallback | nothing\n"
"text/plain": "MeanRisk\n opt | JuMPOptimiser\n | pe | EmpiricalPrior\n | | ce | PortfolioOptimisersCovariance\n | | | ce | Covariance\n | | | | me | SimpleExpectedReturns\n | | | | | w | nothing\n | | | | ce | GeneralWeightedCovariance\n | | | | | ce | SimpleCovariance: SimpleCovariance(true)\n | | | | | w | nothing\n | | | | alg | Full()\n | | | mp | DefaultMatrixProcessing\n | | | | pdm | Posdef\n | | | | | alg | UnionAll: NearestCorrelationMatrix.Newton\n | | | | denoise | nothing\n | | | | detone | nothing\n | | | | alg | nothing\n | | me | SimpleExpectedReturns\n | | | w | nothing\n | | horizon | nothing\n | slv | Solver\n | | name | Symbol: :clarabel1\n | | solver | UnionAll: Clarabel.MOIwrapper.Optimizer\n | | settings | Dict{String, Bool}: Dict{String, Bool}(\"verbose\" => 0)\n | | check_sol | @NamedTuple{allow_local::Bool, allow_almost::Bool}: (allow_local = true, allow_almost = true)\n | | add_bridges | Bool: true\n | wb | WeightBounds\n | | lb | Float64: 0.0\n | | ub | Float64: 1.0\n | bgt | Float64: 1.0\n | sbgt | nothing\n | lt | nothing\n | st | nothing\n | lcs | nothing\n | lcm | nothing\n | cent | nothing\n | gcard | nothing\n | sgcard | nothing\n | smtx | nothing\n | sgmtx | nothing\n | slt | nothing\n | sst | nothing\n | sglt | nothing\n | sgst | nothing\n | sets | nothing\n | plg | nothing\n | tn | nothing\n | te | nothing\n | fees | nothing\n | ret | ArithmeticReturn\n | | ucs | nothing\n | | lb | nothing\n | sce | SumScalariser: SumScalariser()\n | ccnt | nothing\n | cobj | nothing\n | sc | Int64: 1\n | so | Int64: 1\n | card | nothing\n | scard | nothing\n | nea | nothing\n | l1 | nothing\n | l2 | nothing\n | ss | nothing\n | strict | Bool: false\n r | Variance\n | settings | RiskMeasureSettings\n | | scale | Float64: 1.0\n | | ub | nothing\n | | rke | Bool: true\n | sigma | nothing\n | rc | nothing\n | alg | SOCRiskExpr()\n obj | MinimumRisk()\n wi | nothing\n fallback | nothing\n"
},
"metadata": {},
"execution_count": 7
Expand Down Expand Up @@ -217,7 +217,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "JuMPOptimisation\n oe | DataType: MeanRisk\n pa | ProcessedJuMPOptimiserAttributes\n | pr | LowOrderPrior\n | | X | 252×20 Matrix{Float64}\n | | mu | 20-element Vector{Float64}\n | | sigma | 20×20 Matrix{Float64}\n | | chol | nothing\n | | w | nothing\n | | ens | nothing\n | | kld | nothing\n | | ow | nothing\n | | rr | nothing\n | | f_mu | nothing\n | | f_sigma | nothing\n | | f_w | nothing\n | wb | WeightBounds\n | | lb | 20-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}\n | | ub | 20-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}\n | lt | nothing\n | st | nothing\n | lcs | nothing\n | cent | nothing\n | gcard | nothing\n | sgcard | nothing\n | smtx | nothing\n | sgmtx | nothing\n | slt | nothing\n | sst | nothing\n | sglt | nothing\n | sgst | nothing\n | nplg | nothing\n | cplg | nothing\n | tn | nothing\n | fees | nothing\n | ret | ArithmeticReturn\n | | ucs | nothing\n | | lb | nothing\n retcode | OptimisationSuccess\n | res | Dict{Any, Any}: Dict{Any, Any}()\n sol | PortfolioOptimisers.JuMPOptimisationSolution\n | w | 20-element Vector{Float64}\n model | A JuMP Model\n | ├ solver: Clarabel\n | ├ objective_sense: MIN_SENSE\n | │ └ objective_function_type: JuMP.QuadExpr\n | ├ num_variables: 21\n | ├ num_constraints: 4\n | │ ├ JuMP.AffExpr in MOI.EqualTo{Float64}: 1\n | │ ├ Vector{JuMP.AffExpr} in MOI.Nonnegatives: 1\n | │ ├ Vector{JuMP.AffExpr} in MOI.Nonpositives: 1\n | │ └ Vector{JuMP.AffExpr} in MOI.SecondOrderCone: 1\n | └ Names registered in the model\n | └ :G, :bgt, :dev_1, :dev_1_soc, :k, :lw, :obj_expr, :ret, :risk, :risk_vec, :sc, :so, :variance_flag, :variance_risk_1, :w, :w_lb, :w_ub\n"
"text/plain": "JuMPOptimisation\n oe | DataType: MeanRisk\n pa | ProcessedJuMPOptimiserAttributes\n | pr | LowOrderPrior\n | | X | 252×20 Matrix{Float64}\n | | mu | 20-element Vector{Float64}\n | | sigma | 20×20 Matrix{Float64}\n | | chol | nothing\n | | w | nothing\n | | ens | nothing\n | | kld | nothing\n | | ow | nothing\n | | rr | nothing\n | | f_mu | nothing\n | | f_sigma | nothing\n | | f_w | nothing\n | wb | WeightBounds\n | | lb | 20-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}\n | | ub | 20-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}\n | lt | nothing\n | st | nothing\n | lcs | nothing\n | cent | nothing\n | gcard | nothing\n | sgcard | nothing\n | smtx | nothing\n | sgmtx | nothing\n | slt | nothing\n | sst | nothing\n | sglt | nothing\n | sgst | nothing\n | plg | nothing\n | tn | nothing\n | fees | nothing\n | ret | ArithmeticReturn\n | | ucs | nothing\n | | lb | nothing\n retcode | OptimisationSuccess\n | res | Dict{Any, Any}: Dict{Any, Any}()\n sol | PortfolioOptimisers.JuMPOptimisationSolution\n | w | 20-element Vector{Float64}\n model | A JuMP Model\n | ├ solver: Clarabel\n | ├ objective_sense: MIN_SENSE\n | │ └ objective_function_type: JuMP.QuadExpr\n | ├ num_variables: 21\n | ├ num_constraints: 4\n | │ ├ JuMP.AffExpr in MOI.EqualTo{Float64}: 1\n | │ ├ Vector{JuMP.AffExpr} in MOI.Nonnegatives: 1\n | │ ├ Vector{JuMP.AffExpr} in MOI.Nonpositives: 1\n | │ └ Vector{JuMP.AffExpr} in MOI.SecondOrderCone: 1\n | └ Names registered in the model\n | └ :G, :bgt, :dev_1, :dev_1_soc, :k, :lw, :obj_expr, :ret, :risk, :risk_vec, :sc, :so, :variance_flag, :variance_risk_1, :w, :w_lb, :w_ub\n"
},
"metadata": {},
"execution_count": 8
Expand Down
Loading
Loading