finance

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

How to get cid from market and symbol from google finance

这一生的挚爱 提交于 2019-12-11 17:19:26
问题 I would like to fetch the historical data from google finance. Url should be like this, this is the link for Apple. http://www.google.com/finance/historical?cid=22144&startdate=Jan+1%2C+2000&enddate=Jul+30%2C+2017&num=30&ei=bNl9WZC7MNCe0wSR8bw4&output=csv It requires cid I have symbol name AAAPL and market name NASDAQ though, I couldn't find how to get the cid 22144 from symbol and market name. Google finance API is already closed. How can I get cid number ??? 回答1: Are you certain you need

How to add months and days for a simple interest-rate calculation (Java)

梦想与她 提交于 2019-12-11 16:24:58
问题 I am working on a program for an assignment. There I got stuck on how to add the days and months for my program. I can already convert the simple interest into years , but not for months and days: import java.util.Scanner; public class SimpleInterest { public static void main(String[] args) { double PAmount, ROI, TimePeriod, simpleInterset; Scanner scanner = new Scanner(System.in); System.out.print(" Please Enter the Principal Amount : "); PAmount = scanner.nextDouble(); System.out.print("

Aggregate Duplicate Combinations in Table for Financial Ticker and Dates in Matlab

青春壹個敷衍的年華 提交于 2019-12-11 10:41:25
问题 Consider three N by 1 vectors describing N financial transactions: tickers , dates , and volumes . The source for these vectors is a table like this: Tickers Dates Volumes ------- ----- ------- TICKER1 1 200 TICKER1 1 400 TICKER1 2 100 TICKER2 1 300 ... ... ... The source table is sorted firstly by tickers, and secondly by dates. I would like to consolidate (i.e. compute the sum of) all transactions that happened within a given day for a given company ; meaning that the duplicates of all

Limit of multiple Quote in a finance google API call

坚强是说给别人听的谎言 提交于 2019-12-11 09:53:21
问题 I have thousands of stock symbol and for real time prices requesting finance google API, as an example http://finance.google.com/finance/info?client=ig&q=AAPL in the above I am getting price of AAPL, so I am considering it like single HTTP request for signle stock i.e AAPL Now my question is: - can I pass all the stock symbol (assume 400-500) with comma separte to a single URL, If NO then what is the max limit of symobl that will be going to pass a API URL? - Another point is , Assume if I am

Create a function method for all possible time series classes

谁都会走 提交于 2019-12-11 09:44:47
问题 This is a question to continue from this (R: Recreate historical membership from a list of changes in membership) question. The problem discussed there actually arises from a problem of general interest in finance where we typically have member stocks of an index and then changes in the index membership. Often we want to recreate this membership and the data at hand is the current membership and the dates of the changes with the changes. However, the typical problem is to generate this

Pandas pct_change gives slightly different answers to manual

旧时模样 提交于 2019-12-11 08:48:49
问题 Can anyone explain why the pct_change function gives slightly different numbers when using the more manual calculation: pct_change function: print(prices) 0 0 1035.23 1 1032.47 print(prices.pct_change(1)) 0 0 NaN 1 -0.002666 More manual function (prices - prices.shift(1))/prices 0 0 NaN 1 -0.002673 What is the reason behind the difference here? 回答1: Problem is second formula is wrong: prices = pd.DataFrame({0:[1035.23,1032.47]}) print (prices) print(prices.pct_change(1)) 0 0 NaN 1 -0.002666

Google Finance api giving 403 error

孤人 提交于 2019-12-11 03:14:49
问题 I am using google finance api for conversion of currency based on real rate conversion, The API what I am using is given below: https://finance.google.com/finance/converter?a=1&from=USD&to=INR It was working till yesterday but from today it's throwing 403 response code. Can anyone help me on that or Is this url changed?? Thanks 回答1: Seems that Google just silently deprecated finance.google.com , redirecting it to google.com/search . Probably better to switch to a more reliable currency

No contribution in component VaR using historical method in R

喜欢而已 提交于 2019-12-11 02:56:51
问题 I am new to R. I am using package "PerformanceAnalytics" to calculate Component VaR of portfolio. If I use gaussian method , it returns contribution. > VaR(edhec, p=.95, method="gaussian", portfolio_method="component") no weights passed in, assuming equal weighted portfolio $VaR [,1] [1,] 0.01193358 $contribution Convertible Arbitrage CTA Global Distressed Securities Emerging Markets Equity Market Neutral Event Driven Fixed Income Arbitrage 0.0014400703 0.0003687009 0.0012961865 0.0032090406

.NET implementation of Excel Yield function

99封情书 提交于 2019-12-11 01:06:40
问题 Excel's add-in named "Analysis ToolPak" provides "Yield" function for calculation of yield on security that pays periodic interest. Function works well and returns proper data. My understanding is function base on kind of iteration it is not so easy implement it in my code. My question is anybody know/seen implementation in C# (eventually other languages) and can share? Or (maybe) some tips how to implement it? Than I can share :) EDIT: Thanks all posting me "formula" but this is not fully