Questions tagged [stocks]

313 questions
-2
votes
1 answer

Calling specific dates and values in stock prices

How do i call data for the dates and values for any shares? Example: I want to call the stock price and date for apple shares only for dec 2016, dec 2017. Here is what I've tried: import pandas as pd pd.core.common.is_list_like =…
Aaron Oh
  • 3
  • 3
-2
votes
2 answers

Printing last lines of CSV file

I would like to print the final 13 lines of the csv file saved as updated_quotes. It is returning a syntax error. How can I fix this? import csv from collections import deque with open('updated_quotes', 'r') as csv_file: csv_reader =…
Jacob Smith
  • 103
  • 1
  • 6
-2
votes
1 answer

Test difference between correlations

I have a dataset with three variables: 1) mutual fund returns (MF), 2) stock index returns (SI), 3) oil price returns (OP). I have computed a rolling window of correlation coefficients between i) MF and OP, and between ii) SI and OP. The…
Thomas.LRV
  • 23
  • 6
-2
votes
1 answer

Retrieving stock data

I'm trying to retrieve stock data in real-time using Python. As of now I am using the yahoo-finance module which I believe is 15 minutes behind. Also, I can't retrieve the company name with this module. I need to be able to retrieve current…
-2
votes
1 answer

Type " = " and get result

as soon as I press enter after typing the expression,it displays result which is calculate grossProfit, Studio and Theater. And now I want that it should wait for me to type "=" and then show the result? can some one help me how to type "=" and…
-2
votes
1 answer

R - create Stock data from data frame with begin and end date

I need to create stock data from a data frame. The data frame contains a begin and end date, which signify the period an item was in stock. I want to aggregate stock levels per item, then create a time series with the data. I have data of the…
Chris
  • 55
  • 5
-2
votes
1 answer

Creating a database column based on an existing column

I have to calculate the Monthly Return for some businesses using this function: monthly return for month i+1 = (closing price in month i+1 - closing price in month i)/closing price in month i I have a data set that contains the closing price every…
-3
votes
1 answer

When is Stop Loss automatically executed in this case?

I have a question about Stop Loss order - the automated closure of active trading position. It is well known that next candle almost always gets opened on EXACT price level where previous candle closes. But here is one exception: time period where…
Andrew0
  • 1
  • 5
-3
votes
1 answer

Java Stock Viewer Application Issue

For the past few hours, I've been trying to figure out my problem with this stock viewer application. I had it working perfectly fine yesterday, did some edits today, then attempted to revert it back to its original form. Now, instead of printing…
-3
votes
1 answer

save stocks historical data into stock name.csv using python

I used python 2.7 to fetch historical data from Google finance. I would like to save the output in .csv with the stock individual names. Example, AAPL.csv,MSFT.csv and etc. Since I have 900 stocks in the list, I use a for loop to name my file but…
bkcollection
  • 913
  • 1
  • 12
  • 35
-3
votes
2 answers

Find All Possible Permutations In Certain Range C#

I want to make a program to find all valid stock symbols from Yahoo Finance and I already found this: Quickest way to enumerate the alphabet However, I wan't it to go from A - Z and then AA - AZ and then ABA - ABZ and so on and so forth. What is the…
Alerik
  • 25
  • 5
-4
votes
1 answer

Using python and yahoo finance (so something else) how can I get data for the price of an an asset throughout a trading day for X number of days

I don't really have sample code other than the library that I should be using is probably pandas? I am pretty new to both python and yahoo.
-6
votes
1 answer

Export a list of stock prices to excel

I want to import a list of stock prices and export to excel using python. I am able to append the list of prices but not able to export. Please help. Below is the code I am new to Python. import pandas as pd import pandas_datareader.data as…
Sree
  • 3
  • 4
1 2 3
20
21