quantitative-finance Questions

3

I am doing some backtesting for some trading strategies on the stock market on a pandas dataframe and I would like to set a trailing stop loss of 1% away from the entered price. If the stock price ...
Bigot asked 3/7, 2019 at 2:1

5

Hi I am trying to install ibapi in python however the package seems to be unavailable because there is an error every time I try to install it is there another way I can install this package . Your...

1

Following this post, where I had listed some of the interesting ETF1s I had found on some of the relevant forums, I received some valuable criticism. Now I want to use a Google spreadsheet to get t...

3

I am trying to apply the Hurst Exponent on SPY closing prices on a rolling window. The below code (which I got from here: https://www.quantstart.com/articles/Basics-of-Statistical-Mean-Reversion-Te...
Meredi asked 18/7, 2019 at 14:12

1

I was trying to implement 101 quant trading factors that were published by WorldQuant (https://arxiv.org/pdf/1601.00991.pdf). A typical factor is about processing stocks' price and volume informati...
Villanovan asked 12/9, 2022 at 19:45

4

Solved

I have a pandas dataframe of Open/high/low/close stock prices and I am writing to write a function that will add Parabolic SAR to my dataframe. Right now the PSAR number just grows insanely huge an...
Cohl asked 28/2, 2019 at 4:37

6

I am looking for a library which i can use for faster way to calculate implied volatility in python. I have options data about 1+ million rows for which i want to calculate implied volatility. what...
Reitman asked 18/4, 2020 at 12:23

4

Solved

I recently asked a question about calculating maximum drawdown where Alexander gave a very succinct and efficient way of calculating it with DataFrame methods in pandas. I wanted to follow up by a...
Hypogastrium asked 25/4, 2016 at 18:57

5

Solved

I have some stock data based on daily close values. I need to be able to insert these values into a python list and get a median for the last 30 closes. Is there a python library that does this?
Proselytize asked 30/3, 2011 at 12:26

7

I was trying to get JSON for a company by calling API of alphavantage .For some company data is coming and for some company, it's failing. Company for which data are coming - TCS,INFY,MSFT Company ...

3

I'm trying to use PyAlogoTrade's event profiler However I don't want to use data from yahoo!finance, I want to use my own but can't figure out how to parse in the CSV, it is in the format: Times...

1

Solved

Using pandas/python, I want to calculate the longest increasing subsequence of tuples for each DTE group, but efficiently with 13M rows. Right now, using apply/iteration, takes about 10 hours. Here...

3

Solved

I have DataFrame final with returns of my portfolio. I am trying to calculate the MaxDrawdown using the returns. I have tried the below code and did see many stackexchange questions. But not able t...
Fari asked 27/9, 2018 at 14:26

4

Solved

Maximum Drawdown is a common risk metric used in quantitative finance to assess the largest negative return that has been experienced. Recently, I became impatient with the time to calculate max d...
Handbarrow asked 20/4, 2016 at 17:4

2

Solved

I have a dataframe with annual price and dividend data for numerous companies. I am looking to calculate the 3-year annualized return by adding all of the dividends received during the three years ...

2

Solved

I want to process stock level-2 data in pandas. Suppose there are four kinds data in each row for simplicity: millis: timestamp, int64 last_price: the last trade price, float64, ask_queue: the v...
Jumbala asked 18/7, 2019 at 4:0

3

I am trying to create my own function in R based on black scholes variables and solve "backwards" i suppose for sigma. I have created a function to find the call price; however, now I have to find...
Ensoul asked 21/4, 2019 at 1:45

3

I am relatively new to FIX-Protocol. The delimiter for a FIX-Protocol message sometimes show ^ and other times |. Wikipedia for FIX-Protocol says [SOH] ( <Start of Header> for hex 0x01 ) bein...
Bookstand asked 13/8, 2014 at 18:10

2

Solved

I have a DataFrame, df with daily stock returns as such: Date Stock A Stock B Stock C 2018-12-26 -0.018207 0.083554 -0.006546 2018-12-27 0.004223 0.000698 0.003806 2018-12-28 0.024847 -0.008717 0....
Regent asked 6/2, 2019 at 23:41

1

I have a question regarding the Python API of Interactive Brokers. Can multiple asset and stock contracts be passed into reqMktData() function and obtain the last prices? (I can set the snapshots ...

1

I have the following code in my viacsv.py file that aims to allow a custom bundle to be ingested: # # Ingest stock csv files to create a zipline data bundle import os import numpy as np import p...
Jubal asked 22/7, 2017 at 18:23

1

Solved

I'm using the data of alpha vantage for a stock market analysis site. But I cannot find a complete list of symbols available ( to be used in a selection drop down ).
Mcmillan asked 1/8, 2017 at 20:30

3

I've been successful at downloading stock data from Google Finance, like so: import pandas as pd from pandas_datareader import data as web import datetime start = datetime.datetime(2016,1,1) end ...

2

Solved

I am trying to calculate and draw the trendlines for stock prices. I did some searches and thought for a whole day, there is no a really good idea on how to do. I have daily price history and want...
Conundrum asked 3/5, 2017 at 20:58

2

I'd like to learn how to use these packages, but I cannot seem to find any vignettes that offer something other than extensive code snippets. I'd like to learn about how they all fit together...
Leper asked 21/6, 2011 at 23:47

© 2022 - 2024 — McMap. All rights reserved.