Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Error on first Python launch
Post: RE: Error on first Python launch

I'm guessing you tried restarting, correct? Did you use the official windows python installer from python.org? I'd recommend trying to reinstall with that installer.
sawtooth500 General Coding Help 5 318 May-07-2024, 12:47 AM
    Thread: how to: explicitly select the grouping columns after groupby
Post: how to: explicitly select the grouping columns aft...

backtestdf_complete.groupby(['b_index', 'sample_dur']).apply(day_test)That bit of code is throwing me: Output:/Volumes/Python/findparams.py:123: DeprecationWarning: DataFrameGroupBy.apply operated on...
sawtooth500 General Coding Help 0 200 May-05-2024, 03:01 AM
    Thread: Suggestion on how to speed up this code?
Post: RE: Suggestion on how to speed up this code?

Solved my own issue actually - I converted the relevant columns in completedf to a multi-index, now the operation is virtually instantaneous. def day_test(df_row): day_start_time = time.time() ...
sawtooth500 General Coding Help 1 247 May-04-2024, 07:13 PM
    Thread: Suggestion on how to speed up this code?
Post: Suggestion on how to speed up this code?

tester_list = [] def day_test(df_row): day_start_time = time.time() tester = completedf[(completedf['date'] == unique_dates[df_row['b_index'].iloc[0]]) & (completedf['volwagroup'] == df_ro...
sawtooth500 General Coding Help 1 247 May-04-2024, 05:52 PM
    Thread: Joblib worker error
Post: RE: Joblib worker error

Output:b_index: 265 Finished backtesting 2024-01-24 @ 05-03-2024 01:32:15 PM - Execution time (HH:MM:SS.xx) : 00:00:08.69 b_index: 266 Finished backtesting 2024-01-25 @ 05-03-2024 01:32:16 PM - Execut...
sawtooth500 General Coding Help 1 222 May-03-2024, 06:44 PM
    Thread: Calculating Average with Error Handling
Post: RE: Calculating Average with Error Handling

So are you just trying to do this manually as an exercise? If so that's fine but if you just need the average... you are working way too hard. Just get your entire list converted to ints, convert it...
sawtooth500 General Coding Help 7 539 May-03-2024, 05:55 PM
    Thread: Joblib worker error
Post: Joblib worker error

I'm using Joblib for parralelization. Here is my call to joblib: backtestdf_list = Parallel(n_jobs = coremax)(delayed(do_backtest)(backtest_start_index) for backtest_start_index in backtest_start_i...
sawtooth500 General Coding Help 1 222 May-03-2024, 05:30 PM
    Thread: Python editor that will SFTP automatically on save
Post: Python editor that will SFTP automatically on save

Can anyone recommend a python editor for Windows that will automatically upload my file to the server upon save via SFTP? I prefer a minimalist editor to a full IDE, but if I need to go with a full ID...
sawtooth500 General Coding Help 1 290 Apr-29-2024, 10:15 PM
    Thread: Cucumber installation
Post: RE: Cucumber installation

What is your error message? What OS are you running?
sawtooth500 General Coding Help 2 265 Apr-25-2024, 02:47 AM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

(Apr-22-2024, 09:51 PM)deanhystad Wrote: Quote: that's a good point using concat instead That not what I was trying to say. concat is better than append, but both should be used sparingly. What I ...
sawtooth500 General Coding Help 14 746 Apr-24-2024, 01:42 AM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

Thanks, yeah that's a good point using concat instead of _append. If you can think of a vector solution, I'd love that. The fact that I can have an unknown number of rows that are "late prints" is wha...
sawtooth500 General Coding Help 14 746 Apr-22-2024, 06:12 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

This provides more info on late prints if you are curious. https://www.youtube.com/watch?v=OZrMMOHiUeo
sawtooth500 General Coding Help 14 746 Apr-22-2024, 03:00 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

Look at the entire price column - most of the ticks are around the $181.8 level and then we have these 3 ticks that are around $180.8 - From the timestamps, you can tell that all of these ti...
sawtooth500 General Coding Help 14 746 Apr-22-2024, 02:56 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

Look at the price column. Then look at the price in the 3 rows that I have circled - those do not belong. They are cases of "late prints" and need to be filtered out.
sawtooth500 General Coding Help 14 746 Apr-22-2024, 02:33 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

See the below image. So that's an example of the edge case that I have highlighted. So as you see the price for AMD at this point is in time is hovering around $181.80 - then you see these three p...
sawtooth500 General Coding Help 14 746 Apr-22-2024, 01:33 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: RE: FutureWarning: The behavior of DataFrame conca...

(Apr-22-2024, 03:18 AM)deanhystad Wrote: If speed is important, don’t loop and really don’t build data frames a row at a time. This code is what I expect to see when someone has a speed complaint Y...
sawtooth500 General Coding Help 14 746 Apr-22-2024, 01:14 PM
    Thread: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Post: FutureWarning: The behavior of DataFrame concatena...

This is with pandas dataframes. The code works, but I am getting a warning. Error:C:\Users\thpfs\documents\python\cleaner.py:223: FutureWarning: The behavior of DataFrame concatenation with empty or...
sawtooth500 General Coding Help 14 746 Apr-21-2024, 06:16 PM
    Thread: Cloud computing advice needed
Post: RE: Cloud computing advice needed

https://github.com/hosseinmoein/DataFrame I just found that while researching - I don’t know much about it other than the last 30 minute reading about it, but if I go down the C/C++ route the fact th...
sawtooth500 Data Science 3 414 Apr-18-2024, 09:23 PM
    Thread: Cloud computing advice needed
Post: RE: Cloud computing advice needed

Tried both numba and cython - so in the backtest model we're playing with, there are a number of different input parameters. When you start going through all the possible iterations of the input param...
sawtooth500 Data Science 3 414 Apr-17-2024, 10:48 PM
    Thread: Cloud computing advice needed
Post: Cloud computing advice needed

I'm doing stock backtesting using Python - and I've pretty much maxed the computational abilities of my local machines. So I'm looking for some cloud computing advice. Regarding my code, I had a dee...
sawtooth500 Data Science 3 414 Apr-17-2024, 07:31 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020