stocks

Multiple OHLC datasets in one image

烈酒焚心 提交于 2019-12-30 11:52:22
问题 How can I chart multiple datasets in one image using JFreeChart ? Essentially I want to chart a stock's price and it's moving average line in one image. I've tried getting the XYPlot and adding the second dataset, but it does not work. DefaultOHLCDataset dataset = new DefaultOHLCDataset(symbol, items); DefaultOHLCDataset dataset2 = new DefaultOHLCDataset(symbol, evs); JFreeChart chart2 = ChartFactory.createHighLowChart( symbol, "minutes", "prices", dataset, true); chart2.getXYPlot()

Multiple OHLC datasets in one image

て烟熏妆下的殇ゞ 提交于 2019-12-30 11:51:32
问题 How can I chart multiple datasets in one image using JFreeChart ? Essentially I want to chart a stock's price and it's moving average line in one image. I've tried getting the XYPlot and adding the second dataset, but it does not work. DefaultOHLCDataset dataset = new DefaultOHLCDataset(symbol, items); DefaultOHLCDataset dataset2 = new DefaultOHLCDataset(symbol, evs); JFreeChart chart2 = ChartFactory.createHighLowChart( symbol, "minutes", "prices", dataset, true); chart2.getXYPlot()

Creating instances of Esper's epl

大兔子大兔子 提交于 2019-12-24 07:27:31
问题 I am playing around with Esper, learning how to use more advanced concepts. I have a program that fires mock stock events of 3 different stocks. I currently have a module with match_recognize pattern EPL that looks like this: module queries; import events.*; import configDemo.*; import annotations.*; create schema MyTickEvent as TickEvent; @Name('compareStocks') @Description('Compare the difference amount between two stocks') @Subscriber(className='configDemo.MySubscriber') select * from

getSymbols downloading data for multiple symbols and calculate returns

折月煮酒 提交于 2019-12-19 11:47:09
问题 I'm currently downloading stock data using GetSymbols from the Quantmod package and calculating the daily stock returns, and then combining the data into a dataframe. I would like to do this for a very large set of stock symbols. See example below. In stead of doing this manually I would like to use a For Loop if possible or maybe use one of the apply functions, however I can not find the solution. This is what I currently do: Symbols<-c ("XOM","MSFT","JNJ","GE","CVX","WFC","PG","JPM","VZ",

Display stocks data from Google Finance or Yahoo! Finance

巧了我就是萌 提交于 2019-12-18 10:12:16
问题 Can I use the Google Finance API to get stock data? If there is a Flash or Javascript viewer for such stocks data it would be good. I found some chart components that could be used for the same: amCharts Open Flash Chart 回答1: Thats cleared out, Dion Loy, a Google employee recently affirmed that it was perfectly legal to use the Finance API on commercial websites. "You can use our APIs for commercial or non-commercial purposes." Using Google Finance Portfolio Data javascript API, via MarkMail.

Database schema for organizing historical stock data

折月煮酒 提交于 2019-12-18 10:03:13
问题 I'm creating a database schema for storing historical stock data. I currently have a schema as show below. My requirements are to store "bar data" (date, open, high, low, close volume) for multiple stock symbols. Each symbol might also have multiple timeframes (e.g. Google Weekly bars and Google Daily bars). My current schema puts the bulk of the data is in the OHLCV table. I'm far from a database expert and am curious if this is too naive. Constructive input is very welcome. CREATE TABLE

How to Access Yahoo Finance YQL query with historical data

安稳与你 提交于 2019-12-17 22:16:40
问题 I'm new to YQL. Perhaps this is very trivial, but I couldn't quite figure this out. I know, for instance, how to query current stock data from Yahoo/YQL using the YQL console: http://developer.yahoo.com/yql/console/ with the query string: select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT") However, what if I want, say, the same data from yesterday, or a week ago? I tried things such as select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT"

source of historical stock data [closed]

风格不统一 提交于 2019-12-17 15:00:40
问题 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 4 years ago . I'm trying to make a stock market simulator (perhaps eventually growing into a predicting AI), but I'm having trouble finding data to use. I'm looking for a (hopefully free) source of historical stock market data. Ideally, it would be a very fine-grained (second or minute interval) data set with price and volume

HighStock setup

99封情书 提交于 2019-12-14 00:28:02
问题 I am working with HighStock to create a chart for stocks of various companies. In the API, it does not tell me how to retrieve the data about a stock, it is simply retrieving it in a JSON file. I am wondering if a stock parameter (Example: 'AAPL' or 'GOOG') can be passed in to retrieve this information. HighStock Website HighStock Examples 回答1: The Highcharts/Highstock charts by default have turboThreshold that is used to save on expensive data checking and indexing in long series. So if you

Fundamental Data Using IbPy

二次信任 提交于 2019-12-12 09:27:23
问题 I am trying to use IbPY to pull the price of a stock along with its financial statements. I'm new to python and don't entirely understand the complexities of calling some of the different methods within IbPy. I wrote some code to loop through the SP 500 and pull the bid/ask for each stock. I was hoping someone might be able to help me figure out the next step to pull the financial statements. Thoughts on the best way to do that? from ib.opt import ibConnection, message from ib.ext.Contract