profitpy on debian

35 views
Skip to first unread message

tavi

unread,
Jul 1, 2008, 2:39:11 PM7/1/08
to ProfitPy Discuss
Hi,

I'm trying to install profitpy 0.1 (stable) on debian testing (lenny).
Is there a list of required packages from the repositories and/or
additional libraries needed for this to work?
Has anybody tried this before?

Thanks,
Tavi

Glenn H Tarbox, PhD

unread,
Jul 1, 2008, 3:11:02 PM7/1/08
to profitpy...@googlegroups.com

It uses PyQwt... and, of course, Qt... but it "just worked" for me, I
think... although qwt "might" have required some tinkering IIRC.

-glenn

>
> Thanks,
> Tavi
> >
--
Glenn H. Tarbox, PhD || 206-494-0819 || gl...@tarbox.org
"Don't worry about people stealing your ideas. If your ideas are any
good you'll have to ram them down peoples throats" -- Howard Aiken

tavi

unread,
Jul 1, 2008, 4:10:25 PM7/1/08
to ProfitPy Discuss
I have this installed from the repositories:
python-qwt5-qt4 (5.1.0.dfsg-1)

However when I try to run the command "python bin/strategy_designer" I
get the following:

Traceback (most recent call last):
File "bin/strategy_designer", line 29, in <module>
window = StrategyDesigner(filename=filename, parent=None)
File "/home/tavi/src/profitpy-read-only/profit/widgets/
strategydesigner.py", line 95, in __init__
self.setupUi(self)
File "/home/tavi/src/profitpy-read-only/profit/widgets/
ui_strategydesigner.py", line 379, in setupUi
self.callableEditor = CallableSelectWidget(self.callablePage1)
File "/home/tavi/src/profitpy-read-only/profit/widgets/
callableselectwidget.py", line 46, in __init__
self.setupUi(self)va
File "/home/tavi/src/profitpy-read-only/profit/widgets/
ui_callableselect.py", line 139, in setupUi
self.retranslateUi(CallableSelectWidget)
File "/home/tavi/src/profitpy-read-only/profit/widgets/
ui_callableselect.py", line 150, in retranslateUi

self.callableType.addItem(icon,QtGui.QApplication.translate("CallableSelectWidget",
"External Program", None, QtGui.QApplication.UnicodeUTF8))
NameError: global name 'icon' is not defined

Do I have to install pyqwt/qt from sources?

Tavi

Troy Melhase

unread,
Jul 1, 2008, 4:12:55 PM7/1/08
to profitpy...@googlegroups.com
> self.callableType.addItem(icon,QtGui.QApplication.translate("CallableSelectWidget",
> "External Program", None, QtGui.QApplication.UnicodeUTF8))
> NameError: global name 'icon' is not defined

What version of Qt/PyQt? You should use 4.4 if you can.

> Do I have to install pyqwt/qt from sources?

That would be best.

Troy Melhase

unread,
Jul 1, 2008, 7:05:42 PM7/1/08
to profitpy...@googlegroups.com
> self.callableType.addItem(icon,QtGui.QApplication.translate("CallableSelectWidget",
> "External Program", None, QtGui.QApplication.UnicodeUTF8))
> NameError: global name 'icon' is not defined

I just ran into this bug... on Windows. It looks like something isn't
generated correctly via pyuic4. I'll either work around it in the ui
file or find the underlying bug. In both cases, I'll let you know
about a permanent fix.

In the mean time, just open up ui_callableselect.py (not ui) and
comment out every line that begins "self.callableType.addItem(icon".

Troy Melhase

unread,
Jul 1, 2008, 7:10:16 PM7/1/08
to profitpy...@googlegroups.com
> self.callableType.addItem(icon,QtGui.QApplication.translate("CallableSelectWidget",
> "External Program", None, QtGui.QApplication.UnicodeUTF8))
> NameError: global name 'icon' is not defined


Looks like it's been fixed, just not in a release (I can certainly sympathize :)


http://www.mail-archive.com/py...@riverbankcomputing.com/msg14281.html

tavi

unread,
Jul 1, 2008, 9:24:37 PM7/1/08
to ProfitPy Discuss
Thanks for the quick replies !

>
> In the mean time, just open up ui_callableselect.py (not ui) and
> comment out every line that begins "self.callableType.addItem(icon".

With this change and some debian packages installed (python2.5, python-
qwt5-qt4, pyqt4-dev-tools and all dependencies) I managed to get the
GUI up and running. I also installed IbPy from sources. Do I need any
other packages/libraries? (I've seen some posts mentioning
java2python, antlr, etc.)

I have a few basic questions about using the software:
How do I do backtesting?
Where does it get the historical data?
Do I need an IB account to use a particular feature? Can I do anything
without an IB account?

I guess a better question would be if there is an user's manual
somewhere?

Tavi

Troy Melhase

unread,
Jul 1, 2008, 11:56:18 PM7/1/08
to profitpy...@googlegroups.com
> GUI up and running. I also installed IbPy from sources. Do I need any
> other packages/libraries? (I've seen some posts mentioning
> java2python, antlr, etc.)

You'll need scipy, too.

> How do I do backtesting?

Connect to TWS, let it run for a while, then save the session. Close
the profit device and restart it. Load your strategy (you're on your
own here -- use the shell), then import your saved session. The tool
will re-send each TWS message thru the system and your code can pick
them up.

You can also use the same approach without saving a session -- load
your code, then connect to the demo TWS. As the app creates message
objects, your code can react by placing orders (or doing whatever it
is that you want).

> Where does it get the historical data?

From previous sessions. You have to save them yourself.

> Do I need an IB account to use a particular feature? Can I do anything
> without an IB account?

You can use the demo account. Both edemo and fdemo accounts work.

> I guess a better question would be if there is an user's manual
> somewhere?

Patches welcome. :)

tavi

unread,
Jul 2, 2008, 10:46:26 AM7/2/08
to ProfitPy Discuss
I got the the demo version (w/ edemo account) of the TWS working but
the connection from the profit_device fails with the message:
reqMktData() takes exactly 4 arguments (5 given)

Any ideas?

Thanks,
Tavi

Troy Melhase

unread,
Jul 2, 2008, 6:52:17 PM7/2/08
to profitpy...@googlegroups.com
> I got the the demo version (w/ edemo account) of the TWS working but
> the connection from the profit_device fails with the message:
> reqMktData() takes exactly 4 arguments (5 given)

What revision of profitpy and ibpy? In both cases, update to the
latest sources if you can.

tavi

unread,
Jul 3, 2008, 3:52:17 PM7/3/08
to ProfitPy Discuss
> What revision of profitpy and ibpy? In both cases, update to the
> latest sources if you can.

I updated ibpy to the latest version in svn and now the connection to
the IB tws seems to work fine.
It looks like the stable IbPy-0.7.4-9.20 from the download page is no
longer compatible with the latest version of the tws

Tavi
Reply all
Reply to author
Forward
0 new messages