finance

finance api for iphone commercial app use

别来无恙 提交于 2019-12-08 11:48:26
问题 I am planning to create a stock based app for iphone. It's going to be a paid app. So I wanted to know what options do I have for getting the data from API. I have heard of Yahoo finance api, but think it is not free for commecrial use. What does Apple use for their native app. Could you please provide me with other options. Thank you. 回答1: For historical data (historical stock quotes, historical financial statements, historical dividends, etc), you can use the APIs at http://www.mergent.com

Fundamental data based trading algorithms

北城以北 提交于 2019-12-08 08:24:32
问题 Q1: Is it possible to create a script/algorithm that will purely place a BUY or SELL order of a selected currency pair, depending on whether e.g. an interest rate announcement is higher ( or lower ) than the forecast figure? I know many other technical and fundamental factors must be taken in to account before buying and selling financial instruments, but purely as an experiment I'd like to determine if this method is possible. If this can be achieved, Q2: how can an interest rate

How do I add and subtract numbers in SQLite for android?

北战南征 提交于 2019-12-08 05:47:22
问题 I'm creating a simple financial app where the user can input an income or expense. I cannot find anywhere how I can change the "total" amount by adding or subtracting numbers inside the database. The easiest way I can explain it is: user enters an income of $10 : So I would add that 10 into the database. user enters an expense of -$5 : so i would also add that into the database the end result should be $5 as the total, but how do I do this? I'm completely stuck as I've never use SQLite before

Implementing a Fast Fourier Transform for Option Pricing

好久不见. 提交于 2019-12-08 05:32:06
问题 I'm in need of some tips regarding a small project I'm doing. My goal is an implementation of a Fast Fourier Transform algorithm (FFT) which can be applied to the pricing of options. First concern: which FFT? There are a lot of different FFT algorithms, the most famous one being Cooley-Tukey. My thoughts on this: I prefer the most simple one, since this is no thesis or big project, just a course on Algorithms. But it has to be compatible with option pricing (in contrast with the most - well

Change value of some column in xts based on other columns values with lookback

∥☆過路亽.° 提交于 2019-12-07 20:21:38
问题 I have the following xts object (representing long/short entries (column 1 and 2) and exit (columns 3 and 4) triggers with "aggregate" signal column which should be 1 (system is long), -1 (system is short) or 0 (system is flat). I can not make this work for "aggregate" signal column5... The data: LongEntrySignal ShortEntrySignal LongExitSignal ShortExitSignal Signal 18.02.93 0 0 1 0 0 19.02.93 0 0 0 1 0 22.02.93 1 0 0 0 1 23.02.93 0 0 0 0 0 24.02.93 0 0 0 0 0 25.02.93 0 0 0 0 0 26.02.93 0 0 1

Rounding floats with non-exact representation

心已入冬 提交于 2019-12-07 15:48:46
问题 We have a problem with rounding of floating point numbers for some financial calculations. Basically, we want to round monetary amounts like 1000000000.555 to 2 decimals. However, the float representation of this number is 1000000000.5549999 and as a result we will round down to 1000000000.55 rather than the correct 1000000000.56. Is there any way we can come around this problem in a safe way? The only thing we have come up with so far is to always add the smallest representable float to the

Calculating monthly returns in R

断了今生、忘了曾经 提交于 2019-12-07 11:59:15
问题 This might be an insignificant question but unfortunately I'm unable to solve it. I have a portfolio of stocks of 50 companies. I have the dates and the closing prices on that particular day for each of the companies. Data for each company varies with respect to the date from which the stock is being traded. I used this code for calculating the daily returns: return=matrix(NA,nrow(companies),ncol(companies)-1) for (j in 2:52){ k=0 for (i in 1:nrow(companies)){ if (!is.na(companies[i,j]) & k=

What's a succinct, useful and efficient way to store large time-series in F#?

ε祈祈猫儿з 提交于 2019-12-07 08:01:15
问题 I'm currently learning F# and I'm exploring using it to analyse financial time-series. Can anyone recommend a good data structure to store time-series data in? F# offers a rich selection of native types and I'm looking for a some simple combination that would provide an elegant, succinct and efficient solution. I'm looking store tick data, which consists of millions of records each with a time stamp, and several (~5-20) fields of numerical and textual data, with possible missing values. My

Create efficient frontier in PortfolioAnalytics without an xts object

十年热恋 提交于 2019-12-07 07:25:15
问题 Is there a way to create an efficient frontier in the PortfolioAnalytics package without specifying an xts object of asset returns? Instead I'd like to supply the vector of expected returns and the covariance matrix. 回答1: There are two ways. First you can supply a list containing containing your matrices with the structure shown below and then call optimize.portfolio including this list as an argument. # num_assets is the number of assets in the portfolio momentargs <- list() momentargs$mu <-

Are there any free APIs for retrieving the S&P 500's component symbols? [closed]

纵饮孤独 提交于 2019-12-07 03:13:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Some sort of free REST API would be ideal, but in general is there any free API or web service or CSV file (that's not behind a password prompt) or anything out there that one can query to get the current list of the S&P 500 index constituents? I've looked on S&P's site itself (http://www.standardandpoors.com),