Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Bundesbank API Problems
Post: RE: Bundesbank API Problems
Thank you. That did the trick. |
|
illmattic |
Web Scraping & Web Development |
2 |
979 |
May-12-2023, 10:18 PM |
|
|
Thread: Bundesbank API Problems
Post: Bundesbank API Problems
Hello,
So far I'm 0/2 on APIs. I am a beginner but I keep running into problems with APIs.
The German Bundesbank provides an API and the documentation. They clearly write out how to make an API req... |
|
illmattic |
Web Scraping & Web Development |
2 |
979 |
May-12-2023, 05:21 PM |
|
|
Thread: API Request / JSON
Post: RE: API Request / JSON
I see. That's too bad. Thanks for your help anyways! |
|
illmattic |
Web Scraping & Web Development |
3 |
959 |
May-10-2023, 12:52 PM |
|
|
Thread: API Request / JSON
Post: API Request / JSON
Hello,
I am having difficulty pulling data from an API which says that parameter content needs to be application/json. Here is the link to the the api notes http://www.nfib-sbet.org/developers/
Her... |
|
illmattic |
Web Scraping & Web Development |
3 |
959 |
May-09-2023, 01:45 PM |
|
|
Thread: Replace for loop to search index position
Post: RE: Replace for loop to search index position
(Sep-03-2022, 02:41 PM)deanhystad Wrote: List comprehension. A shorthand way of writing a for loop that builds a list.
matching_sheet_indexes = []
for index, sheet in enumerate(list_of_sheets):
... |
|
illmattic |
General Coding Help |
5 |
1,274 |
Sep-03-2022, 04:04 PM |
|
|
Thread: Replace for loop to search index position
Post: RE: Replace for loop to search index position
(Sep-03-2022, 11:37 AM)Yoriz Wrote: matching_sheet_indexes = [
index for index, sheet in enumerate(list_of_sheets) if sheet_match in sheet
]
Thank you! This did the trick. I was playing around w... |
|
illmattic |
General Coding Help |
5 |
1,274 |
Sep-03-2022, 02:34 PM |
|
|
Thread: Replace for loop to search index position
Post: Replace for loop to search index position
Hi
I have following code which searches for index position of matching string without having to match everything:
sheet_num = []
for x in range(len(list_of_sheets)):
if sheet_match in list_of_sh... |
|
illmattic |
General Coding Help |
5 |
1,274 |
Sep-03-2022, 10:53 AM |
|
|
Thread: Referencing string names in df to outside variables
Post: Referencing string names in df to outside variable...
I am trying to create a point system of NFL teams calculating points based on wins and losses relating to how many points they win by and the strength of their opponent.
I have the following df:
Outp... |
|
illmattic |
General Coding Help |
1 |
1,360 |
Nov-16-2021, 08:57 AM |
|
|
Thread: Getting Residuals from AutoReg
Post: Getting Residuals from AutoReg
Hello,
I am trying to get the residuals from the AutoReg function from StatsModels but it outputs NaNs:
from statsmodels.tsa.ar_model import AutoReg
df = stock['Close'] / stock['Close'].shift(1) - ... |
|
illmattic |
Data Science |
0 |
1,683 |
Apr-08-2021, 12:39 PM |
|
|
Thread: IF statement to apply at each date
Post: RE: IF statement to apply at each date
sorry for the delay. I forgot about this. I figured it out doing this:
def arrow(data):
signal = []
x = data['Close'] > data['Trend']
for row in x:
... |
|
illmattic |
General Coding Help |
2 |
2,644 |
Apr-08-2021, 12:31 PM |
|
|
Thread: IF statement to apply at each date
Post: IF statement to apply at each date
Hello,
I am trying to write a function that includes an IF statement that looks at two columns in the dataframe to highlight the dates when the 'value' is higher than the 'trend':
def arrow(trend, c... |
|
illmattic |
General Coding Help |
2 |
2,644 |
Mar-10-2021, 09:41 PM |
|
|
Thread: Function won't apply dynamically in timeseries
Post: Function won't apply dynamically in timeseries
Hello,
I have the following function: def custom_hurst(timeseries):
series = timeseries.iloc[-360:,0]
max_window = len(series)
min_window = 15
ndarray_likes = [np.ndarray]
if... |
|
illmattic |
General Coding Help |
1 |
1,733 |
Jan-07-2021, 07:13 PM |
|
|
Thread: Hurst Exponent in Rolling Basis
Post: RE: Hurst Exponent in Rolling Basis
I've tried using the function like this:
df.apply(lambda row: custom_hurst(df), axis=1)Output:1983-03-30 0.682463
1983-03-31 0.682463
1983-04-04 0.682463
1983-04-05 0.682463
1983-04-06 ... |
|
illmattic |
Data Science |
1 |
3,853 |
Jan-06-2021, 09:49 PM |
|
|
Thread: Hurst Exponent in Rolling Basis
Post: Hurst Exponent in Rolling Basis
Hello,
I have come across code (https://github.com/Mottl/hurst/blob/mast..._init__.py) that calculates the Hurst exponent from a time series. I have simplified it for my purpose:
def custom_hurst(ser... |
|
illmattic |
Data Science |
1 |
3,853 |
Jan-05-2021, 05:20 PM |
|
|
Thread: search for more than one word using lambda
Post: RE: search for more than one word using lambda
(Nov-12-2020, 08:42 PM)bowlofred Wrote: words = ['costs', 'administrative']
sga = [index for index in income.index if any(w in index for w in words)]
thanks! this did the trick. |
|
illmattic |
General Coding Help |
2 |
2,013 |
Nov-13-2020, 11:44 AM |
|
|
Thread: search for more than one word using lambda
Post: search for more than one word using lambda
Hello,
I have this code:
sga = list(filter(lambda x: 'costs' in x, income.index))trying to grab all index labels with the word 'costs' in it but I want to add another word to include in this grab. So... |
|
illmattic |
General Coding Help |
2 |
2,013 |
Nov-12-2020, 08:30 PM |
|
|
Thread: Multi-Indexing in Single Column
Post: RE: Multi-Indexing in Single Column
(Oct-16-2020, 05:32 PM)jefsummers Wrote: Not sure I understand, but I would suggest using .map to get multiple columns with values - commonly used for "one hot" encoding.
Don't think this will do th... |
|
illmattic |
Data Science |
2 |
1,577 |
Oct-16-2020, 06:36 PM |
|
|
Thread: Multi-Indexing in Single Column
Post: Multi-Indexing in Single Column
Hello,
I'm trying to create a more visually appealing dataframe and so I want my index to be broken down into categories with different headings.I tried various ways to do this with no luck. Multi-In... |
|
illmattic |
Data Science |
2 |
1,577 |
Oct-16-2020, 02:11 PM |
|
|
Thread: Calculating Beta over Rolling Periods
Post: RE: Calculating Beta over Rolling Periods
Figured it out....
def beta(individual, market, period):
returns = individual.join(market).dropna()
returns = returns.pct_change().dropna()
cov = returns.iloc[0:,0].rolling(period).cov(r... |
|
illmattic |
Data Science |
2 |
5,382 |
Sep-27-2020, 09:45 PM |
|
|
Thread: Calculating Beta over Rolling Periods
Post: Calculating Beta over Rolling Periods
Hello,
I'm trying to create a function that calculates the x-day beta of a stock to the overall market. This is my current function:
def beta(individual, market, period):
returns = individual.j... |
|
illmattic |
Data Science |
2 |
5,382 |
Sep-27-2020, 04:36 PM |