fix example
This commit is contained in:
parent
85b83e1745
commit
5e06e0d2d2
@ -444,7 +444,7 @@ see: http://stackoverflow.com/a/37732384/5075246
|
||||
N = 10
|
||||
D = length(tickers)
|
||||
weights = rand(N,D)
|
||||
weights ./= sum(weights, 2)
|
||||
weights ./= sum(weights, dims = 2)
|
||||
returns = sort!((1:N) + D*randn(N))
|
||||
|
||||
portfoliocomposition(weights, returns, labels = permutedims(tickers))
|
||||
|
||||
@ -1143,7 +1143,7 @@ end
|
||||
@recipe function f(pc::PortfolioComposition)
|
||||
weights, returns = pc.args
|
||||
n = length(returns)
|
||||
weights = cumsum(weights,2)
|
||||
weights = cumsum(weights, dims = 2)
|
||||
seriestype := :shape
|
||||
|
||||
# create a filled polygon for each item
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user