finance

Using Python: Get / download daily finance market data (stocks, etfs, etc.) by the securities ISIN (International Securities Identification Number) [closed]

こ雲淡風輕ζ 提交于 2020-03-25 16:01:09
问题 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 days ago . today I tried to find an API or a possibility to get data for specific securities (stocks, ETFs, etc.). Unfortunately the package 'yfinance' only allows you get data based on the securitie's name (e. g. MSFT for Microsoft's shares). 回答1: After quite a lot of research I found the package investpy which allows you

Graphing The Results Of A Keras Stock Market Predictive Neural Network

左心房为你撑大大i 提交于 2020-02-02 17:32:33
问题 I have recently attempted to complete a neural network to predict fluctuations within the prices of individual stocks on the stock market, utilising Keras as the framework for the neural network and Quandl as the database for the retrieval of historical stock prices; the code for this program was completed within the Google Colaboratory integrated development environment and the program is displayed below: import tensorflow as tf import keras import numpy as np import quandl from sklearn

How to speed-up python nested loop?

我与影子孤独终老i 提交于 2020-01-31 04:47:20
问题 I'm performing a nested loop in python that is included below. This serves as a basic way of searching through existing financial time series and looking for periods in the time series that match certain characteristics. In this case there are two separate, equally sized, arrays representing the 'close' (i.e. the price of an asset) and the 'volume' (i.e. the amount of the asset that was exchanged over the period). For each period in time I would like to look forward at all future intervals

Creating new Dataframe data slicing issue

让人想犯罪 __ 提交于 2020-01-30 08:44:04
问题 This is my code snippet. The code works however, I am getting the following error: "A value is trying to be set on a copy of a slice from a DataFrame" I am guessing this is due to some deprecated syntax... new_data['mon_fri'] = 0 for i in range(0,len(new_data)): if (new_data['Dayofweek'][i] == 0 or new_data['Dayofweek'][i] == 4): new_data['mon_fri'][i] = 1 else: new_data['mon_fri'][i] = 0 回答1: Dont loop in pandas if exist vectorized alternatives, here is possible use isin for boolean mask and

Common strategies to deal with rounding errors in currency-intensive soft?

筅森魡賤 提交于 2020-01-29 04:42:25
问题 What is your advice on: compensation of accumulated error in bulk math operations on collections of Money objects. How is this implemented in your production code for your locale? theory behind rounding in accountancy. any literature on topic. I currently read Fowler. He mentions Money type, it's typcal structure (int, long, BigDecimal), but says nothing on strategies. Older posts on money-rounding (here, and here) do not provide a details and formality I need. Thoughts I found in the inet

RATE Function from EXCEL in Swift providing different results

和自甴很熟 提交于 2020-01-24 21:56:07
问题 func RATE(nper: Double, pmt: Double, pv: Double, fv: Double, type: Double, guess: Double) -> Double{ var rate = guess var y: Double = 0 var f: Double = 0 var FINANCIAL_MAX_ITERATIONS: Double = 128 var FINANCIAL_PRECISION = 1.0e-08 if (abs(rate) < FINANCIAL_PRECISION) { y = pv * (1 + nper * rate) + pmt * (1 + rate * type) * nper + fv } else { f = exp(nper * log(1 + rate)) y = pv * f + pmt * (1 / rate + type) * (f - 1) + fv } var y0 = pv + pmt * nper + fv var y1 = pv * f + pmt * (1 / rate +

How to use R to scrape financials from Yahoo Finance

删除回忆录丶 提交于 2020-01-23 02:44:38
问题 I am interested in analyzing the balance, income and cash flow statements from Yahoo Finance for multiple tickers using R. I have seen that there are R packages that pull information from Yahoo Finance, but all the examples I have seen concern historical stock price information. Is there a way I can pull historical information from these statements using R? For example, for Apple (AAPL) the retrievable links are as follows: https://finance.yahoo.com/quote/AAPL/financials?p=AAPL https:/

Summary not working for OLS estimation

烈酒焚心 提交于 2020-01-14 08:17:32
问题 I am having an issue with my statsmodels OLS estimation. The model runs without any issues, but when I try to call for a summary so that I can see the actual results I get the TypeError of the axis needing to be specified when shapes of a and weights differ. My code looks like this: from __future__ import print_function, division import xlrd as xl import numpy as np import scipy as sp import pandas as pd import statsmodels.formula.api as smf import statsmodels.api as sm file_loc = "/Users

Real Time Candle stick chart using javafx (and no jfreechart )

柔情痞子 提交于 2020-01-12 09:36:49
问题 I want to make a candlestick chart which reads stream of data and then plot it (so it will be plotting either as data comes or after certain period it will update the previous plot). I do not want to use any third party software as Jfree chart want it to be build from javafx directly. Any help will be highly appreciated. Thank you Edit : Can anyone tell me how stage.show() works like which class which method it involke. 回答1: The Ensemble application includes a candlestick chart implementation

Real Time Candle stick chart using javafx (and no jfreechart )

[亡魂溺海] 提交于 2020-01-12 09:34:31
问题 I want to make a candlestick chart which reads stream of data and then plot it (so it will be plotting either as data comes or after certain period it will update the previous plot). I do not want to use any third party software as Jfree chart want it to be build from javafx directly. Any help will be highly appreciated. Thank you Edit : Can anyone tell me how stage.show() works like which class which method it involke. 回答1: The Ensemble application includes a candlestick chart implementation