almost have profitpy running, except for path issues

15 views
Skip to first unread message

Jeff

unread,
May 23, 2007, 1:50:52 PM5/23/07
to ProfitPy Discuss
Ok, I am just getting started with profitpy, so please excuse the very
basic questions.

I believe that I have all of the libraries, installed -- almost all of
them were in portage, thankfully, even if most of them were masked :)

I got profit_device to run by inserting "sys.path.append('/home/jeff/
dl/ibpy/profitpy') before the line that imported from
profit.lib.core. profit_device loads up, and I can connect to tws and
pull up little plots and all that goodness.

However, if I type "export PYTHON_PATH=/home/jeff/dl/ibpy/profitpy"
and then try to run profit_device without the sys.path.append line, it
complains about not being able to find profit.lib.core. This makes no
sense to me, and I'd rather not have to put that append file in
every .py file of the package every time I do a source checkout. I am
sure this is a very simple thing, but I haven't been able to figure it
out. I'm running a fresh install of gentoo.

One other brief question: are there any example strategies included,
just for learning purposes, like a simple buy/sell on an MA cross,
just to show how a strategy is implemented?

To the authors, thank you for sharing this program!

Jeff

Jeff

unread,
May 23, 2007, 3:01:05 PM5/23/07
to ProfitPy Discuss
I am revising this because I have discovered the answer to one
question: my particular gentoo /python seems like like $PYTHONPATH
instead of $PYTHON_PATH, and with that, it finds the core libraries.

So now that everything is working (I think), here are a couple of
revised questions on how to actually use the program:

1. Where do I find the GUI tools to collect ticker data, and the CLI
tool to back-test strategies? I see the "session_collector" program
(although it is not gui), but I do not see where to tell it what data
to collect. Also, I have not been able to locate the CLI tool for
backtesting. The front page calls it the "coverage" tool, but I
grepped for coverage and came up with nothing.

2. Are there any working (not necessarily profitable, just
functional) example strategies that show how these programs work
together? I tried to recreate the strategy from the screenshots, but
couldn't find things like AccountManager, OrderSubmitter, etc.

3. Is there a way to add tickers from the profit_device gui? I've
clicked all over and couldn't find one!

Sorry for all the dumb questions. I have looked around quite a bit,
but I can't figure out if I am just missing this stuff, or if some of
it is not included in the distributed files.

Thanks in advance,

Jeff

Message has been deleted

Troy Melhase

unread,
May 24, 2007, 2:49:23 AM5/24/07
to profitpy...@googlegroups.com, Jeff
On Wed May 23 2007, Jeff wrote:
> I am revising this because I have discovered the answer to one
> question: my particular gentoo /python seems like like $PYTHONPATH
> instead of $PYTHON_PATH, and with that, it finds the core libraries.

it should always be PYTHONPATH.

> So now that everything is working (I think), here are a couple of
> revised questions on how to actually use the program:
>
> 1. Where do I find the GUI tools to collect ticker data, and the CLI
> tool to back-test strategies? I see the "session_collector" program
> (although it is not gui), but I do not see where to tell it what data
> to collect. Also, I have not been able to locate the CLI tool for
> backtesting. The front page calls it the "coverage" tool, but I
> grepped for coverage and came up with nothing.

both of these are not yet done in 0.2, sorry!

i'm thinking that the backtest script won't be necessary -- the main gui can
behave just like one in that it can read a strategy file and load serialized
messages. (fwiw, the front page is a hold-over from 0.1, which did have a
cli tool for backtesting.)

as for the session_collector script, it will eventually grow the ability to
read the tickers from a saved trading strategy. that will definitely be in
0.2.

> 2. Are there any working (not necessarily profitable, just
> functional) example strategies that show how these programs work
> together? I tried to recreate the strategy from the screenshots, but
> couldn't find things like AccountManager, OrderSubmitter, etc.

the whole strategy bit isn't yet done in 0.2. when it is, you'll have a
design tool to hook your strategy programs, objects, and callables into the
framework.

> 3. Is there a way to add tickers from the profit_device gui? I've
> clicked all over and couldn't find one!

not yet; right now the values are hard-coded in source in 0.2. the strategy
designer tool allows you to define tickers (but it, too, isn't hooked into
the profit_device gui).

> Sorry for all the dumb questions. I have looked around quite a bit,
> but I can't figure out if I am just missing this stuff, or if some of
> it is not included in the distributed files.

not dumb questions at all. you've asked about every feature that is missing.
well done! :)

as always, patches welcome!

signature.asc

Jeff

unread,
May 24, 2007, 11:22:20 AM5/24/07
to ProfitPy Discuss

On May 24, 2:49 am, Troy Melhase <t...@gci.net> wrote:
> On Wed May 23 2007, Jeff wrote:
>
> > I am revising this because I have discovered the answer to one
> > question: my particular gentoo /python seems like like $PYTHONPATH
> > instead of $PYTHON_PATH, and with that, it finds the core libraries.
>
> it should always be PYTHONPATH.
>
> > So now that everything is working (I think), here are a couple of
> > revised questions on how to actually use the program:
>
> > 1. Where do I find the GUI tools to collect ticker data, and the CLI
> > tool to back-test strategies? I see the "session_collector" program
> > (although it is not gui), but I do not see where to tell it what data
> > to collect. Also, I have not been able to locate the CLI tool for
> > backtesting. The front page calls it the "coverage" tool, but I
> > grepped for coverage and came up with nothing.
>
> both of these are not yet done in 0.2, sorry!

well, I guess we're just going to have to dock your pay ;)

>
> i'm thinking that the backtest script won't be necessary -- the main gui can
> behave just like one in that it can read a strategy file and load serialized
> messages. (fwiw, the front page is a hold-over from 0.1, which did have a
> cli tool for backtesting.)

I like your idea of just storing all the IB messages, and playing them
back. I did manage to export a session and them import it -- pretty
neat! I was pretty excited to discover this project, as I was in the
early stages of working on something that would have some similar
functionality. However, I was using a much different approach to
gathering data/playing back that wasn't nearly as elegant (or fast).
I am not that great of a python programmer though, so sometimes I just
do what works :)

> as for the session_collector script, it will eventually grow the ability to
> read the tickers from a saved trading strategy. that will definitely be in
> 0.2.
>
> > 2. Are there any working (not necessarily profitable, just
> > functional) example strategies that show how these programs work
> > together? I tried to recreate the strategy from the screenshots, but
> > couldn't find things like AccountManager, OrderSubmitter, etc.
>
> the whole strategy bit isn't yet done in 0.2. when it is, you'll have a
> design tool to hook your strategy programs, objects, and callables into the
> framework.
>
> > 3. Is there a way to add tickers from the profit_device gui? I've
> > clicked all over and couldn't find one!
>
> not yet; right now the values are hard-coded in source in 0.2. the strategy
> designer tool allows you to define tickers (but it, too, isn't hooked into
> the profit_device gui).
>
> > Sorry for all the dumb questions. I have looked around quite a bit,
> > but I can't figure out if I am just missing this stuff, or if some of
> > it is not included in the distributed files.
>
> not dumb questions at all. you've asked about every feature that is missing.
> well done! :)

Good, this means I am not losing my mind. I was sitting there reading
the code thinking, the front page says these features are here, not in
progress, but I don't see them anywhere!

> as always, patches welcome!

I would love to, but I fear that much of the code has surpassed my
basic level of python competency!

Overall what I hear you saying is that I should stick with .1 for now
if I am looking for a complete feature set. I'll check this out from
svn and poke around, then I'll probably have more questions :)

Thanks for your work on this project, it is very interesting!

Jeff

> signature.asc
> 1KDownload

Reply all
Reply to author
Forward
0 new messages