financial

Programmatic access to detailed historical financial data [closed]

我们两清 提交于 2019-12-18 10:29:39
问题 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 9 months ago . I know that Yahoo has a great API for accessing detailed financial metrics about a company documented at http://www.gummy-stuff.org/Yahoo-data.htm. Yahoo also provides historical pricing data, documented at http://code.google.com/p/yahoo-finance-managed/wiki/csvHistQuotesDownload. However, I'm trying to find a

“For money, always decimal”?

让人想犯罪 __ 提交于 2019-12-12 07:48:12
问题 Well, the rule " For money, always decimal " isn't applied inside the Microsoft development team, because if it was: Namespace: Microsoft.VisualBasic Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll) Financial.IPmt and all the other methods would receive/return decimal and not double as it is. Now I wonder if I can use these methods without worry with round mistakes? Should I use some other libraries to work with finances? If yes, could you point me some good ones (for C# use) ?

C# Ta-Lib Exponential Moving average(EMA) calculation

谁都会走 提交于 2019-12-12 04:32:44
问题 I am using the Ta-lib library in my C# project to calculate Exponential moving averages. I have to calculate EMA for 20 periods. I did my calculation on a spreadsheet (Excel) and I got the correct result; while using the same data points with ta-lib library I am getting wrong result. I am using close price from the attached image. Core.Ema(startIdx, endIdx, close, 20, out outBegIdx, out outNBElement, smoothClose); after running ta-lib function my result is 113.783380952381 0 0 0 0 0 0 0 0 0 0

Creating Financial statements in sql

喜夏-厌秋 提交于 2019-12-12 02:55:36
问题 Consider the following Tables: Now before I continue I should preface this by stating that I'm not an accountant (which if you happen to be an accountant reading this probably shows!!) I have an invoices table and a related InvoicePayments table and a separate Contacts statements table. My Intention is to provide the end user with the ability to create numbered statements for clients that in theory , at least, could be called back at any time in the future. Logically It should be possible to

Lag values and differences in pandas dataframe with missing quarterly data

旧巷老猫 提交于 2019-12-12 02:22:49
问题 Though Pandas has time series functionality, I am still struggling with dataframes that have incomplete time series data. See the pictures below, the lower picture has complete data, the upper has gaps. Both pics show correct values. In red are the columns that I want to calculate using the data in black. Column Cumm_Issd shows the accumulated issued shares during the year, MV is market value. I want to calculate the issued shares per quarter ( IssdQtr ), the quarterly change in Market Value

What's the correct number type for financial variables in Swift?

[亡魂溺海] 提交于 2019-12-11 09:53:55
问题 I am used to programming in Java, where the BigDecimal type is the best for storing financial values, since there are manners to specify rounding rules over the calculations. In the latest swift version (2.1 at the time this post is written), which native type better supports correct calculations and rounding for financial values? Is there any equivalent to java's BigDecimal? Or anything similar? 回答1: If you are concerned about storing for example $1.23 in a float or double , and the

How to validate a International Securities Identification Number (ISIN) number

痞子三分冷 提交于 2019-12-09 04:46:29
问题 If I am not wrong, ISIN numbers last position is a verification digit. What is the mathematical function that determines its value in function of the first 11 digits? 回答1: http://en.wikipedia.org/wiki/International_Securities_Identification_Number The procedure for calculating ISIN check digits is similar to the "Modulus 10 Double Add Double" technique used in CUSIPs. To calculate the check digit, first convert any letters to numbers by adding their ordinal position in the alphabet to 9, such

Transforming Calendar Quarter to Financial Quarter

瘦欲@ 提交于 2019-12-08 13:23:26
问题 I am working with a dateframe (INPUT) that contains number the of transaction of a product per calendar quarter. The first column (DATE) contains the calendar quarter in this format "2016 Q2". I would like to transform this date into the a financial quarter format such as "2016/17 Q1". The financial year start in the 1st April. I came up with the following code which does the job, but I was wondering if there is a formula or a neater code that I could use. INPUT$FY_Date=character(nrow(INPUT))

Calculate the monthly returns with data.frames in R

大城市里の小女人 提交于 2019-12-08 09:50:46
问题 I want to calculate the monthly returns for a list of securities over a period of time. The data I have has the following structure: date name value "2014-01-31" a 10.0 "2014-02-28" a 11.1 "2014-03-31" a 12.1 "2014-04-30" a 11.9 "2014-05-31" a 11.5 "2014-06-30" a 11.88 "2014-01-31" b 6.0 "2014-02-28" b 8.5 "2014-03-31" b 8.2 "2014-04-30" b 8.8 "2014-05-31" b 8.3 "2014-06-30" b 8.9 The code I tried: database$date=as.Date(database$date) monthlyReturn<- function(df) { (df$value[2] - df$value[1])

np.where() causing RSI to end early

好久不见. 提交于 2019-12-08 07:00:22
问题 I initially began with one np.where() to run my RSI rules of sending a buy signal (1.0) when the RSI (rsip) dips below 20 (lower_bnd), and selling (0.0) above 80 (upper_bnd). The program bought correctly, but sold as soon as rsip went above 20. I would like for the program to hold onto the purchase until the RSI hits 80. This was my original function: signals['signal']= np.where(signals['rsip'] < lower_bnd, 1.0, 0.0) Signals is a dataframe containing a series of signals and the RSI level. I