fja05680 / pinkfish

A backtester and spreadsheet library for security analysis.
https://fja05680.github.io/pinkfish
MIT License
264 stars 60 forks source link

How rigid are the pinkfish requirements? #41

Closed EcoFin closed 2 years ago

EcoFin commented 2 years ago

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

fja05680 commented 2 years ago

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q .

EcoFin commented 2 years ago

Farrell, Thanks for the confirmation! That’s what I will be trying again later on today (after I finish my teaching). I was pretty sure from looking at how clean the code is that the only one that might ever require a specific version was pandas (or possibly the pyfolio stuff – Quantopian code is a nightmare as you know). I will indeed share my step-by-step Win 10 install. Actually, I was going to offer to do that if I got it right. I liked the videos. Doing one on a portfolio backtest would be helpful for some people I’m sure. The dual momentum sample code that I looked at seemed a good candidate. Incidentally, I will be trying to use Stefan Jansen’s pyfolio-reloaded so I will have feedback from that. I will also try connecting Aroussi’s quantstat which is my favourite reporting summary gizmo

Best regards

arthur

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q .

EcoFin commented 2 years ago

Farrell,

So, after some time messing around, I have pinkfish working inside an existing custom Anaconda env on Win 10.

Like so many other things in life, it’s really simple after you go down all the dead ends. Here is what you do:

  1. Download pinkfish-master.zip from the github site and unzip somewhere convenient
  2. Copy pinkfish code folder into your preferred site-packages directory
  3. Make sure you have the short-list of required packages (provided in the attached document) in your Anaconda env
  4. If not, install anything you are missing
  5. We’re done

I have run a couple of your notebooks just fine to test.

The one other thing that I had to do was to update my ta-lib for python 3.8 ( that env was previously on 3.7.10). If 3.8 really is a requirement, it should be added to the instructions.

For Win 10 x64 the correct approach is to go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, download the precompiled binary (whl) for your OS version. You install it into site-packages; it will show up as talib. You don’t need the old C files at all.

Obviously, there is nothing specific to Anaconda in these instructions!

Hope that helps. I am looking forward to trying some real experiments tomorrow.

Regards

Arthur younger

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q .

fja05680 commented 2 years ago

Authur,

Great that you got it working! With your permission, I'd like to add a section or link to the installation instructions using your notes.

I don't believe Python 3.8 is required. It's probably more like 3.6. The problem for me though is that in order to list 3.6, I should really test it. I just don't have the time or willingness to test multiple configurations. So, I just list what's working for me.

Making more youtube videos is something I had intended to do already and near the top of my todo list now. In the meantime, feel free to email me again if you have any questions.

cheers, Farrell

On Sat, Jul 17, 2021 at 9:50 PM EcoFin @.***> wrote:

Farrell,

So, after some time messing around, I have pinkfish working inside an existing custom Anaconda env on Win 10.

Like so many other things in life, it’s really simple after you go down all the dead ends. Here is what you do:

  1. Download pinkfish-master.zip from the github site and unzip somewhere convenient
  2. Copy pinkfish code folder into your preferred site-packages directory
  3. Make sure you have the short-list of required packages (provided in the attached document) in your Anaconda env
  4. If not, install anything you are missing
  5. We’re done

I have run a couple of your notebooks just fine to test.

The one other thing that I had to do was to update my ta-lib for python 3.8 ( that env was previously on 3.7.10). If 3.8 really is a requirement, it should be added to the instructions.

For Win 10 x64 the correct approach is to go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, download the precompiled binary (whl) for your OS version. You install it into site-packages; it will show up as talib. You don’t need the old C files at all.

Obviously, there is nothing specific to Anaconda in these instructions!

Hope that helps. I am looking forward to trying some real experiments tomorrow.

Regards

Arthur younger

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881984595, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHUO4RJAREJIDZL6ZDDTYIXOHANCNFSM5AOULY3Q .

EcoFin commented 2 years ago

Farrell,

Please use my notes as you wish. The summary would, I think, save a bit of time for anyone trying to install on Windows or into an existing environment.

I would normally have upgraded to python 3.8 anyhow. Anaconda installs tend to run a little bit behind the latest version, but not that much. It is almost a full-time job, as you know, to keep multiple environments up to date. I used your suggested version as a motivator!

I went through all your examples up to 100 yesterday, making a few notes as I went along, and will do the others today.

As of now I have a couple of questions. I was going to save them until the end by here they are:

  1. There doesn’t seem to be any trade costs/commission recording right now. I would be inclined to add something basic that writes another column to tlog (I suppose). Either a fixed amount or a percentage per trade. Without it, It’s hard to directly compare CAGR results, for example, to experiments one might have conducted using another library. (I have a small inventory of output either from Backtrader or Zipline for example).
  2. I think it would be easy enough to incorporate additional data (let’s say some set of “fundamental” or economic indicators) just by sticking them in their own dataframe, doing whatever calculations and then adding the resulting column as another (custom) “indicator” to the pinkfish ts frame … I’d be interested in any feedback if you have ever thought about the problem.
  3. The “optimization” approach that I have seen in the examples as far as I have gone is single-variable. I haven’t thought too hard about how to use a better optimizer, but I will do that eventually. It is a point of interest.
  4. On my agenda for today is to figure out how the accounting is done for simple levered instruments (my interests are fx and cfds, I don’t touch crypto myself). I looked quickly at the futures examples but haven’t studied them. I do see margin with factors of 1, 2 and 4 and have looked at the one example (080) that uses margin = 2. But I haven’t taken the time yet to figure out exactly how it’s working. If it does the obvious, adding in a different fx/cfd factor or 10, 20 or whatever might not be hard. I know that simple levered products like those are not really allowed for US-based investors.

The other thing I will do, just because it is easier, is to figure out how to feed pinkfish out of my own database. It’ll push out dataframes easily enough.

Best regards

Arthur younger

From: Farrell Aultman @.> Sent: Monday, July 19, 2021 2:42 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Authur,

Great that you got it working! With your permission, I'd like to add a section or link to the installation instructions using your notes.

I don't believe Python 3.8 is required. It's probably more like 3.6. The problem for me though is that in order to list 3.6, I should really test it. I just don't have the time or willingness to test multiple configurations. So, I just list what's working for me.

Making more youtube videos is something I had intended to do already and near the top of my todo list now. In the meantime, feel free to email me again if you have any questions.

cheers, Farrell

On Sat, Jul 17, 2021 at 9:50 PM EcoFin @.***> wrote:

Farrell,

So, after some time messing around, I have pinkfish working inside an existing custom Anaconda env on Win 10.

Like so many other things in life, it’s really simple after you go down all the dead ends. Here is what you do:

  1. Download pinkfish-master.zip from the github site and unzip somewhere convenient
  2. Copy pinkfish code folder into your preferred site-packages directory
  3. Make sure you have the short-list of required packages (provided in the attached document) in your Anaconda env
  4. If not, install anything you are missing
  5. We’re done

I have run a couple of your notebooks just fine to test.

The one other thing that I had to do was to update my ta-lib for python 3.8 ( that env was previously on 3.7.10). If 3.8 really is a requirement, it should be added to the instructions.

For Win 10 x64 the correct approach is to go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, download the precompiled binary (whl) for your OS version. You install it into site-packages; it will show up as talib. You don’t need the old C files at all.

Obviously, there is nothing specific to Anaconda in these instructions!

Hope that helps. I am looking forward to trying some real experiments tomorrow.

Regards

Arthur younger

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881984595, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHUO4RJAREJIDZL6ZDDTYIXOHANCNFSM5AOULY3Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-882283523 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3HOESHUHUR5NZTKWLAH4TTYPCL3ANCNFSM5AOULY3Q .

fja05680 commented 2 years ago

Arthur,

Thanks for your feedback. I would like to close out this issue after I make the changes to the requirements, which was how you started this one. Please create new individual issues for the points you mentioned below. I have read them over a couple of times and have some thoughts and suggestions but each would be better dealt with separate from the others.

Thanks,

Farrell

On Mon, Jul 19, 2021, 7:33 AM EcoFin @.***> wrote:

Farrell,

Please use my notes as you wish. The summary would, I think, save a bit of time for anyone trying to install on Windows or into an existing environment.

I would normally have upgraded to python 3.8 anyhow. Anaconda installs tend to run a little bit behind the latest version, but not that much. It is almost a full-time job, as you know, to keep multiple environments up to date. I used your suggested version as a motivator!

I went through all your examples up to 100 yesterday, making a few notes as I went along, and will do the others today.

As of now I have a couple of questions. I was going to save them until the end by here they are:

  1. There doesn’t seem to be any trade costs/commission recording right now. I would be inclined to add something basic that writes another column to tlog (I suppose). Either a fixed amount or a percentage per trade. Without it, It’s hard to directly compare CAGR results, for example, to experiments one might have conducted using another library. (I have a small inventory of output either from Backtrader or Zipline for example).
  2. I think it would be easy enough to incorporate additional data (let’s say some set of “fundamental” or economic indicators) just by sticking them in their own dataframe, doing whatever calculations and then adding the resulting column as another (custom) “indicator” to the pinkfish ts frame … I’d be interested in any feedback if you have ever thought about the problem.
  3. The “optimization” approach that I have seen in the examples as far as I have gone is single-variable. I haven’t thought too hard about how to use a better optimizer, but I will do that eventually. It is a point of interest.
  4. On my agenda for today is to figure out how the accounting is done for simple levered instruments (my interests are fx and cfds, I don’t touch crypto myself). I looked quickly at the futures examples but haven’t studied them. I do see margin with factors of 1, 2 and 4 and have looked at the one example (080) that uses margin = 2. But I haven’t taken the time yet to figure out exactly how it’s working. If it does the obvious, adding in a different fx/cfd factor or 10, 20 or whatever might not be hard. I know that simple levered products like those are not really allowed for US-based investors.

The other thing I will do, just because it is easier, is to figure out how to feed pinkfish out of my own database. It’ll push out dataframes easily enough.

Best regards

Arthur younger

From: Farrell Aultman @.> Sent: Monday, July 19, 2021 2:42 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Authur,

Great that you got it working! With your permission, I'd like to add a section or link to the installation instructions using your notes.

I don't believe Python 3.8 is required. It's probably more like 3.6. The problem for me though is that in order to list 3.6, I should really test it. I just don't have the time or willingness to test multiple configurations. So, I just list what's working for me.

Making more youtube videos is something I had intended to do already and near the top of my todo list now. In the meantime, feel free to email me again if you have any questions.

cheers, Farrell

On Sat, Jul 17, 2021 at 9:50 PM EcoFin @.***> wrote:

Farrell,

So, after some time messing around, I have pinkfish working inside an existing custom Anaconda env on Win 10.

Like so many other things in life, it’s really simple after you go down all the dead ends. Here is what you do:

  1. Download pinkfish-master.zip from the github site and unzip somewhere convenient
  2. Copy pinkfish code folder into your preferred site-packages directory
  3. Make sure you have the short-list of required packages (provided in the attached document) in your Anaconda env
  4. If not, install anything you are missing
  5. We’re done

I have run a couple of your notebooks just fine to test.

The one other thing that I had to do was to update my ta-lib for python 3.8 ( that env was previously on 3.7.10). If 3.8 really is a requirement, it should be added to the instructions.

For Win 10 x64 the correct approach is to go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, download the precompiled binary (whl) for your OS version. You install it into site-packages; it will show up as talib. You don’t need the old C files at all.

Obviously, there is nothing specific to Anaconda in these instructions!

Hope that helps. I am looking forward to trying some real experiments tomorrow.

Regards

Arthur younger

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361> , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881984595, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACD3KHUO4RJAREJIDZL6ZDDTYIXOHANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-882283523> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3HOESHUHUR5NZTKWLAH4TTYPCL3ANCNFSM5AOULY3Q> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-882475946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHQNBVFU7VHTHC7VYLTTYQEPTANCNFSM5AOULY3Q .

EcoFin commented 2 years ago

Farrell

For sure. The original can be closed. I still have some of the examples to finish working through today. Then I will review my other questions again. Pinkfish is turning out to be a lot of fun.

Thanks

arthur

From: Farrell Aultman @.> Sent: Tuesday, July 20, 2021 9:49 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Arthur,

Thanks for your feedback. I would like to close out this issue after I make the changes to the requirements, which was how you started this one. Please create new individual issues for the points you mentioned below. I have read them over a couple of times and have some thoughts and suggestions but each would be better dealt with separate from the others.

Thanks,

Farrell

On Mon, Jul 19, 2021, 7:33 AM EcoFin @.***> wrote:

Farrell,

Please use my notes as you wish. The summary would, I think, save a bit of time for anyone trying to install on Windows or into an existing environment.

I would normally have upgraded to python 3.8 anyhow. Anaconda installs tend to run a little bit behind the latest version, but not that much. It is almost a full-time job, as you know, to keep multiple environments up to date. I used your suggested version as a motivator!

I went through all your examples up to 100 yesterday, making a few notes as I went along, and will do the others today.

As of now I have a couple of questions. I was going to save them until the end by here they are:

  1. There doesn’t seem to be any trade costs/commission recording right now. I would be inclined to add something basic that writes another column to tlog (I suppose). Either a fixed amount or a percentage per trade. Without it, It’s hard to directly compare CAGR results, for example, to experiments one might have conducted using another library. (I have a small inventory of output either from Backtrader or Zipline for example).
  2. I think it would be easy enough to incorporate additional data (let’s say some set of “fundamental” or economic indicators) just by sticking them in their own dataframe, doing whatever calculations and then adding the resulting column as another (custom) “indicator” to the pinkfish ts frame … I’d be interested in any feedback if you have ever thought about the problem.
  3. The “optimization” approach that I have seen in the examples as far as I have gone is single-variable. I haven’t thought too hard about how to use a better optimizer, but I will do that eventually. It is a point of interest.
  4. On my agenda for today is to figure out how the accounting is done for simple levered instruments (my interests are fx and cfds, I don’t touch crypto myself). I looked quickly at the futures examples but haven’t studied them. I do see margin with factors of 1, 2 and 4 and have looked at the one example (080) that uses margin = 2. But I haven’t taken the time yet to figure out exactly how it’s working. If it does the obvious, adding in a different fx/cfd factor or 10, 20 or whatever might not be hard. I know that simple levered products like those are not really allowed for US-based investors.

The other thing I will do, just because it is easier, is to figure out how to feed pinkfish out of my own database. It’ll push out dataframes easily enough.

Best regards

Arthur younger

From: Farrell Aultman @.> Sent: Monday, July 19, 2021 2:42 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Authur,

Great that you got it working! With your permission, I'd like to add a section or link to the installation instructions using your notes.

I don't believe Python 3.8 is required. It's probably more like 3.6. The problem for me though is that in order to list 3.6, I should really test it. I just don't have the time or willingness to test multiple configurations. So, I just list what's working for me.

Making more youtube videos is something I had intended to do already and near the top of my todo list now. In the meantime, feel free to email me again if you have any questions.

cheers, Farrell

On Sat, Jul 17, 2021 at 9:50 PM EcoFin @.***> wrote:

Farrell,

So, after some time messing around, I have pinkfish working inside an existing custom Anaconda env on Win 10.

Like so many other things in life, it’s really simple after you go down all the dead ends. Here is what you do:

  1. Download pinkfish-master.zip from the github site and unzip somewhere convenient
  2. Copy pinkfish code folder into your preferred site-packages directory
  3. Make sure you have the short-list of required packages (provided in the attached document) in your Anaconda env
  4. If not, install anything you are missing
  5. We’re done

I have run a couple of your notebooks just fine to test.

The one other thing that I had to do was to update my ta-lib for python 3.8 ( that env was previously on 3.7.10). If 3.8 really is a requirement, it should be added to the instructions.

For Win 10 x64 the correct approach is to go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, download the precompiled binary (whl) for your OS version. You install it into site-packages; it will show up as talib. You don’t need the old C files at all.

Obviously, there is nothing specific to Anaconda in these instructions!

Hope that helps. I am looking forward to trying some real experiments tomorrow.

Regards

Arthur younger

From: Farrell Aultman @.> Sent: Friday, July 16, 2021 8:07 AM To: fja05680/pinkfish @.> Cc: EcoFin @.>; Author @.> Subject: Re: [fja05680/pinkfish] How rigid are the pinkfish requirements? (#41)

Hi ay,

Thank you for your kind words regarding pinkfish. The requirements are not rigid. It should be >= and not ==. It was set that way when I ran freeze. I will look into changing it. I've never tried getting pinkfish working with Windows. But, I've heard from a few people who have. There isn't anything specific to Linux in the code. If you run into issues with the code, please let me know and if it's simple I'll fix it. Also, can you make some notes on your installation process? Doesn't have to be detailed, but that would be nice, something of a guide for other people who want to work with Windows.

Thanks,.

Farrell

On Thu, Jul 15, 2021, 9:42 PM EcoFin @.***> wrote:

Pinkfish seems quite promising for rapid backtesting of portfolio strategies using moderate sized databases . But I note that all the requirements are set to specific package versions. I imagine that just reflects the fact that those are the ones you used to develop most recently. But they make a mess of an existing up-to-date Anaconda environment. If they really are necessary, it would be good to tell potential users that they had better set up a dedicated env. If not, writing them as >= ver no. would make things easier. I don't really like proliferating envs, but could do it if there is a good reason. This is a Win 10 install. The Linux VM might be fun but just adds complexity.

Are there any known requirements that really are locked and couldn't be rewritten as suggested?

regards ay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACD3KHVFGYVEF3L24ZN4EZ3TX6E7PANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-881398361> , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AB3HOETBJXR4X7JEZDBYAZDTYAOFRANCNFSM5AOULY3Q

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-881984595, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACD3KHUO4RJAREJIDZL6ZDDTYIXOHANCNFSM5AOULY3Q

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/fja05680/pinkfish/issues/41#issuecomment-882283523> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3HOESHUHUR5NZTKWLAH4TTYPCL3ANCNFSM5AOULY3Q> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-882475946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHQNBVFU7VHTHC7VYLTTYQEPTANCNFSM5AOULY3Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/41#issuecomment-883408337 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3HOEWM73WIRBV26PL34MDTYV5C7ANCNFSM5AOULY3Q .

fja05680 commented 2 years ago

I updated requirements.txt and setup.py and lessened the rigid requirements.