Questions tagged [stocks]
313 questions
1
vote
1 answer
Calculating Daily Stock Drawdowns in SQL
I have a table of stock prices, from which I'd like to calculate drawdowns.
Ticker Date price
ABC 01/01/13 100.00
ABC 01/02/13 101.50
ABC 01/03/13 99.80
ABC 01/04/13 95.50
ABC …

Coding_Newbie
- 365
- 1
- 3
- 11
1
vote
3 answers
DAX / Xetra on alphavantage
I am very very happy with Alphavantage.
BUT I can't find the german stocks (Xetra)
I have tried:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=xtr:lin&apikey=MYKEY
(But this works…

Lytje
- 23
- 1
- 5
1
vote
1 answer
What is the best way to graph a portfolio of stock transactions?
I want to graph a portfolio of stock trades over a period of say one year.
I will have many trades with many different stocks. The question becomes, what is the best way to calculate the value of the profile over the year.
1) Query for all…

jimijon
- 2,046
- 1
- 20
- 39
1
vote
2 answers
live stock ticker
I want to display live stock prices on my php website. So, is there any script for this?
thanks

krishna
- 923
- 3
- 15
- 42
1
vote
1 answer
TimeDelta to generate Pandas Index
I am working with intraday stock data that i have downloaded to a CSV file. The data contains the stock price for MO per minute. In order to generate a time-frame for the data, i use the pandas function:
pd.timedelta_range('1 days 9 hours 30…

Martin598
- 1,491
- 3
- 13
- 20
1
vote
0 answers
How can I fetch stock price at a given time on a certain date?
I've found a lot of historical price APIs for fetching stock price for a given date. But haven't been successful in finding any API to provide price at certain time on a given date. Like price of GOOG on 08/02/2017 at 3:55PM - How do I find this?

Vamshi Vangapally
- 1,972
- 6
- 21
- 25
1
vote
2 answers
JS Send notification based on user settings
I'm building a basic stock watcher application - let's call the currently-watched stock N. When the stock moves by X%, trigger a notification / event. X is defined on a per user basis.
The server holds the stock's current price, alongside the users…

Life
- 67
- 1
- 6
1
vote
1 answer
Yahoo finance API returns different values
I'm using yahoo.finance.quotes but the values I get for FDC are different than when I search for FDC plus one more.
FDC and GOOG: then FDC Change: -0.55
ONLY FDC: FDC Change: +0.41
Any ideas why?

Mati Tucci
- 2,826
- 5
- 28
- 40
1
vote
1 answer
Loading an alternative script if website widget located is down
So I am having a problem with some of my code because the website I'm pulling my widget from, is down. What I have is a script that calls to a widget to pull up future projected values of oil prices. This morning the website I pull my information…

LordTakahiro
- 57
- 6
1
vote
1 answer
Matplotlib - Trouble with fills
I'm trying to do some basic plotting of stocks using matplot lib and I'm stumped on trying to fill the volume part of the plot.
I'm trying to plot in two seperate charts (one on top of the other) a stocks price and volume. When I plot 2 straight…

BigWinston
- 69
- 6
1
vote
1 answer
quantmod : can't generate daily returns for stock using OHLC
I'm attempting to get daily returns by using one BDH pull, but I can't seem to get it to work. I considered using quantmod's periodreturn function, but to no avail. I'd like the PctChg column populated, and any help is greatly appreciated.…

Frank Drin
- 1,613
- 2
- 13
- 18
1
vote
1 answer
Fundamental Data Using IbPy
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…

ashap
- 101
- 1
- 11
1
vote
1 answer
Python backtest using percentage based commission
I'm writing a script to backtest some strategies for a set of stocks using the bt framework for python. In the bt documentation (backtest module) it says:
commission (fn(quantity)): The commission function to be used.
So when I run my code…

simtaxman
- 613
- 2
- 11
- 18
1
vote
1 answer
Is it possible to repeat code in R - but replace certain characters? (needs to be done 350 times)
I am writing a script to data scrape analyst share ratings and current share prices from the internet in R (using RStudio);
library(rvest)
BKGURL <- 'http://www.marketbeat.com/stocks/LON/BKG/' #analysts
BKGwebpage <- read_html(BKGURL)
BKGhtml <-…

Andreas Wersäll
- 11
- 2
1
vote
0 answers
Python- Real Time Stock Price plot with matplotlib- figure won't show
I'm trying to make a graph that plots real time stock prices from yahoo finance using matplotlib and python 3.5. My code is as follows:
import urllib.request
from bs4 import BeautifulSoup
import matplotlib.pyplot as plt
import datetime
import…

Sac Otaku
- 21
- 3