portfolio

SciPy portfolio optimization with industry-level constraints

橙三吉。 提交于 2019-12-21 05:24:08
问题 Trying to optimize a portfolio weight allocation here which maximize my return function by limit risk. I have no problem to find the optimized weight that yields to my return function by simple constraint that the sum of all weight equals to 1, and make the other constraint that my total risk is below target risk. My problem is, how can I add industry weight bounds for each group? My code is below: # -*- coding: utf-8 -*- import pandas as pd import numpy as np import scipy.optimize as sco

Converting data frame into Time Series using R [duplicate]

允我心安 提交于 2019-12-20 04:08:13
问题 This question already has answers here : How to convert data frame into time series? (5 answers) Closed 9 months ago . I have a time series data of the format Time Ask Bid Trade Ask_Size Bid_Size Trade_Size 2016-11-01 09:00:12 NA 901 NA NA 100 NA 2016-11-01 09:00:21 NA NA 950 NA NA 5 2016-11-01 09:00:21 NA 950 NA NA 5 NA 2016-11-01 09:00:21 905 NA NA 10 NA NA 2016-11-01 09:00:24 NA 921 NA NA 500 NA 2016-11-01 09:00:28 NA 879 NA NA 2 NA The structure of the dataframe is str(df) 'data.frame':

Sorting portfolios based on criteria (top30%,Middle 40%. and Bottom 30%)

点点圈 提交于 2019-12-13 06:52:01
问题 Currently, I have the following table Company---------Date--------Exchange-------Size A---------------2000---------A-------------50 A---------------2001---------A------------ 100 B---------------2000---------B------------450 B---------------2001---------B------------- 458 I want to allocate each company into three categories "Top" ==> Top 30% "Middle" ==> Middle 40% "Bottom" ==> Bottom 30% Calculating cutoff values should be filtered with 'year' and 'Exchange'=A I have tried the following

SonarQube - Views Portfolio Plugin aka Helicopter View nemo - Combined all projects metrics

旧时模样 提交于 2019-12-13 06:40:12
问题 I'm doing a POC on getting Helicopter view on our SonarQube instance. I'm using latest SonarQube (5.1), sonar-runner (2.4), Gradle 2.3 (build system) on a RHEL 6.6 (Santiago) machine. Helicopter view: Plugin in SonarQube that I'm trying is: http://www.sonarsource.com/products/plugins/governance/portfolio-management/ The end result I want on my SonarQube instance is, to look like this: http://nemo.sonarqube.org/ and if you click on one of the VIEW(which you can create using Views Portfolio

r - Portfolio Optimization - solve.QP - Constraints are Inconsistent

若如初见. 提交于 2019-12-12 07:35:32
问题 I am trying to use solve.QP to solve a portfolio optimization problem (quadratic problem) Total 3 assets There are 4 constraints: sum of weights equal to 1 portfolio expected return equals to 5.2% each asset weight greater than 0 each asset weight smaller than .5 Dmat is the covariance matrix Dmat <- matrix(c(356.25808, 12.31581, 261.8830, 212.31581, 27.24840, 18.50515, 261.88302, 18.50515,535.45960), nrow=3, ncol=3) dvec is each asset's expected return dvec <- matrix(c(9.33, 3.33, 9.07),

How to embed a .nav file into pdf portfolio?

拟墨画扇 提交于 2019-12-12 03:56:46
问题 I am new here and new to iTextsharp. I have successfully created a pdf portfolio file and displayed it on browser. The default layout is details or custom. And my boss hopes to add some layout for it, like click-through or revolve. Does anyone know how to do it? I will appreciate your help! Should I embed the .nav file into pdf portfolio or create a navigation by myself? I don't know how? 回答1: .nav files are described in the Adobe extensions to ISO-32000-1 (level 3) as described on page 541

Portfolio Optimisation under participation constraints

一曲冷凌霜 提交于 2019-12-12 03:06:34
问题 I am trying to find a set of hedge ratios by optimising a portfolio for minimum variance under participation constraints of the assets. Ultimately I would like to optimise the assets weights for other measures of risk such as minimum CVaR, VaR or maximum return/risk. My portfolio comprises 9 series. 1 domestic asset and 4 international assets which are 0% currency hedged: "D_Asset1","F_Asset2","F_Asset3","F_Asset4","F_Asset5" I have also series for those that are 100% currency hedged: "H_F

RallyDataSource.update is not working for portfolioitem/feature (works for userstories)

纵然是瞬间 提交于 2019-12-11 08:34:44
问题 Here is the API verison I am using: script type="text/javascript" src="/apps/1.33/sdk.js?apiVersion=1.43"></script> The goal is to display a portfolio item/feature and all the child user stories of the feature in a grid. Then based on the US fields value, update the value of the field of the portfolio item/feature. I am able to update the release field of a UserStory using rallydatasource.update command, but the same command doesn't work for updating fields of portfolio item/feature Here are

How do you adjust/control the scale in a treemap (using the 'portfolio' library) in R?

元气小坏坏 提交于 2019-12-10 14:11:07
问题 I am using R and the 'portfolio' library to build a treemap. The scale is defaulting to '-1000 to 1000'. I need it to be '0 to 1000', for example. I know there is a 'scale' parameter to map.market(), but I can't figure out what to pass to it. 回答1: A symmetric colour-mapping around zero is hard coded into map.market : legend.ncols <- 51 l.x <- (0:(legend.ncols - 1))/(legend.ncols) l.y <- unit(0.25, "npc") l.cols <- color.ramp.rgb(seq(-1, 1, by = 2/(legend.ncols - 1))) if (is.null(scale)) { l

Portfolio Optimisation under weight constraints

北慕城南 提交于 2019-12-09 20:17:19
问题 With a lot of help from contributors to StackOverflow I have managed to put together a function to derive the weights of a 2-asset portfolio which maximises the Sharpe ratio. No short sales are allowed and the sum of weights add to 1. What I would like to do now is to constrain asset A to not being more or less than 10% from a user defined weight. As an example I would like to constrain the weight of asset A to be no less than 54% or more than 66% (i.e 60% +/- 10%). So on the below example I