real-time financial data

2013-11-21 Thread Daniel Pocock


Hi,

Is there any extension for receiving a live market data feed (e.g.
currency exchange rates, stock prices) in Calc, or is anybody working on
such a thing?

If not, is there any extension that might serve as a useful template for
somebody wanting to develop something like that?

Debian/Ubuntu recently starting distributing the OpenMAMA packages - it
would seem like a good candidate as the underlying market data API for a
Calc extension

  http://packages.qa.debian.org/o/openmama.html
  http://www.openmama.org

Regards,

Daniel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


real-time financial data (howto)

2013-12-05 Thread Neeraj Rai
I noticed this post a few days back.
http://lists.freedesktop.org/archives/libreoffice/2013-November/057706.html
glad to see that C++ will be preferred due to performance.

where can I find more imfo on progress and any upcoming docs on streaming
data?
will there be ability to have streaming x-y plots using this data ?

thanks
Neeraj
-- 
=
Intuition - is the inability to figure out the facts on which we based the
decision.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-21 Thread jonathon


On 11/21/2013 03:41 PM, Daniel Pocock wrote:

> Is there any extension for receiving a live market data feed (e.g.
> currency exchange rates, stock prices) in Calc, or is anybody working on

There is an extension that retrieves data from Yahoo.
It claims to be able to retrieve stock prices, currency exchange rates,
and precious metal prices. From my perspective, it required way too much
babysitting, to be useful.

jonathon
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-21 Thread mariosv
Have you tried through Menu/Insert/Link to external data.

https://help.libreoffice.org/Calc/Inserting_External_Data_in_Table_WebQuery

Miguel Ángel.



--
View this message in context: 
http://nabble.documentfoundation.org/real-time-financial-data-tp4084322p4084391.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-21 Thread Daniel Pocock


On 22/11/13 00:33, mariosv wrote:
> Have you tried through Menu/Insert/Link to external data.
> 
> https://help.libreoffice.org/Calc/Inserting_External_Data_in_Table_WebQuery

I had seen that, is it only suitable for on-demand data sources, or also
event-based sources like OpenMAMA that provide several price updates per
second?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-22 Thread Jesús Corrius
Hi Daniel,

2013/11/21 Daniel Pocock 

>
>
> Hi,
>
> Is there any extension for receiving a live market data feed (e.g.
> currency exchange rates, stock prices) in Calc, or is anybody working on
> such a thing?
>

Short answer: yes, people are working on it.

There's been a lot of interest lately, and some very good work too[1], to
make Calc a great product for statistics, financial calculations,
computational finance, etc.. There's a lot of good work coming in
LibreOffice 4.2.

Also as a wish for LibreOffice 4.3 I would love to see new core Calc
functions like:

=GoogleFinance("GOOG")
=GoogleFinance("GOOG"; "volume")
=YahooFinance("YHOO"; "eps")
etc.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=66477

-- 
Jesús Corrius 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-22 Thread Thorsten Behrens
Jesús Corrius wrote:
> Also as a wish for LibreOffice 4.3 I would love to see new core Calc
> functions like:
> 
> =GoogleFinance("GOOG")
>
Not sure that would be overly smart to have as a core feature - urls
and formats for these things tend to be a bit in flux. ;)

There's this guy here (worked for me in the past):
 http://extensions.openoffice.org/de/project/getquote

For your original question wrt. a suitable example:
 http://www.enigmacurry.com/archive/2009/12/1/

HTH,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-22 Thread Daniel Pocock
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 22/11/13 20:17, Thorsten Behrens wrote:
> Jess Corrius wrote:
>> Also as a wish for LibreOffice 4.3 I would love to see new core
>> Calc functions like:
>> 
>> =GoogleFinance("GOOG")
>> 
> Not sure that would be overly smart to have as a core feature -
> urls and formats for these things tend to be a bit in flux. ;)

That is where a middleware like OpenMAMA comes in handy - OpenMAMA
(with a messaging broker or multicast solution like avis or ZeroMQ
underneath) can distribute the prices around on your local network for
different users and applications.

Then you just need some feed handler(s) to suck the prices from Google
or another source and transmit them into the OpenMAMA framework.  You
can change the feed handler when necessary without having to change
all the code that consumes prices.

> There's this guy here (worked for me in the past): 
> http://extensions.openoffice.org/de/project/getquote
> 
> For your original question wrt. a suitable example: 
> http://www.enigmacurry.com/archive/2009/12/1/

The description looks very similar to what I had in mind, but I notice
that is in Python.

For OpenMAMA, there is a C++ and Java API and I notice that
LibreOffice offers both C++ and Java extension writing tutorials.  Can
you make any comment on which might be the better choice and any
example in one of those languages?  I suspect C++ would be the better
choice for performance.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJSj7mqAAoJEOm1uwJp1aqDFrcQAMdwBGhTYxkFGHBgzg4hdp4D
mxTiXeptsRBhI5yeSXJQduWPguLVG8aOjnyaW3hdHbFZ4sEWzEAG1MWWpaPYD8RK
TEE9qDs4fGsZZprGRd3WX1Y1foNKu1z2F0aNjYaV4iyEXceexOw7JGCOXEocvFTf
J3L19GJkK4npVLSJQu0LKx/TwDxjjrRwTcFHvfv57lmlC/ffS3aFjWXZCfFtaibc
X/9h16SKdJ8GkRIrMPj2xRqpUgzVnqM8hCO/8lBDB6NHfvbK95TafnmJsFKuuXNT
/DVJuYo3qjYctLcRFnRlo4JOdRRvJBSXpd4PJPbxNCex6QYCCQor04BalQa5F3uN
C7x3ZVOoxRyG6IML9BI0rw8T2R91k0/3MwzysG9sMRAMQhaOwWLvnhfCONlXomxi
2Z4fKXk4D6/j5mmSnpC7iSB8rwxDN3NqZIQt0bXVrJxSMOqoW82NG7x8pOaP+oz6
L23VFYHEyJL5cft5G0ACqZkDJ8oJlzfv1+5UfhjyAUnLSToQe9zTArn1fLsvMRNs
QyVYORS5N+VXKXxLNOA5UBxzJs1WIoCPVBEgRNJ8TyNQNIyrDAFdBZLvkRk05b8l
S6MjgfM1J98G2NaV5p8BfRIWq1LKGienhKEHZlxHQGv+HZXfVp7vgW3VEWK1nKAb
uQ55Nco90B3/FWknfHRV
=xpqk
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-23 Thread Thorsten Behrens
Daniel Pocock wrote:
> On 22/11/13 20:17, Thorsten Behrens wrote:
> > Not sure that would be overly smart to have as a core feature -
> > urls and formats for these things tend to be a bit in flux. ;)
> 
> That is where a middleware like OpenMAMA comes in handy - OpenMAMA
> (with a messaging broker or multicast solution like avis or ZeroMQ
> underneath) can distribute the prices around on your local network for
> different users and applications.
> 
Would you be interested in working on integrating such a thing?

> > For your original question wrt. a suitable example: 
> > http://www.enigmacurry.com/archive/2009/12/1/
> 
> The description looks very similar to what I had in mind, but I notice
> that is in Python.
> 
> For OpenMAMA, there is a C++ and Java API and I notice that
> LibreOffice offers both C++ and Java extension writing tutorials.  Can
> you make any comment on which might be the better choice and any
> example in one of those languages?  I suspect C++ would be the better
> choice for performance.
> 
For an extension, C++ is a less-desirable choice. If you're confident
hacking something up in C++, it would perhaps be indeed best to aim
for a core implementation. Conversely, Java or Python are nice fits
for extensions (with the added bonus that you can target past releases
of LibreOffice with that, and are not tied in any way to the main
LibreOffice release schedule).

Cheers,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-23 Thread Daniel Pocock
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 23/11/13 14:26, Thorsten Behrens wrote:
> Daniel Pocock wrote:
>> On 22/11/13 20:17, Thorsten Behrens wrote:
>>> Not sure that would be overly smart to have as a core feature
>>> - urls and formats for these things tend to be a bit in flux.
>>> ;)
>> 
>> That is where a middleware like OpenMAMA comes in handy -
>> OpenMAMA (with a messaging broker or multicast solution like avis
>> or ZeroMQ underneath) can distribute the prices around on your
>> local network for different users and applications.
>> 
> Would you be interested in working on integrating such a thing?
> 

Yes, that is why I'm looking at it


>>> For your original question wrt. a suitable example: 
>>> http://www.enigmacurry.com/archive/2009/12/1/
>> 
>> The description looks very similar to what I had in mind, but I
>> notice that is in Python.
>> 
>> For OpenMAMA, there is a C++ and Java API and I notice that 
>> LibreOffice offers both C++ and Java extension writing tutorials.
>> Can you make any comment on which might be the better choice and
>> any example in one of those languages?  I suspect C++ would be
>> the better choice for performance.
>> 
> For an extension, C++ is a less-desirable choice. If you're
> confident hacking something up in C++, it would perhaps be indeed
> best to aim for a core implementation. Conversely, Java or Python
> are nice fits for extensions (with the added bonus that you can
> target past releases of LibreOffice with that, and are not tied in
> any way to the main LibreOffice release schedule).


Would it be problematic for core to have an OpenMAMA dependency
though?  OpenMAMA is not available on all platforms.

It would be possible in Java - after all, OpenMAMA provides a Java API
and it is packaged too:

  http://packages.debian.org/unstable/libmamda-java

My only concern would be performance - if somebody uses this to get a
single currency and they manually refresh the quote, it is not an
issue.  If somebody builds a more elaborate spreadsheet with dozens of
currencies and they want live refreshes and recalculation of their
entire spreadsheet then a C or C++ solution may be better for them.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJSkLh9AAoJEOm1uwJp1aqDsjkP+weWVBKH8feE0SKbYLnfz+OZ
RpJEI0k7UGDB/t1ae7gz9EhgwVCjvnHBlk3BJYEMXI66OsVEBuy2hp94y3WJcoW4
gyL4uG2Sry33+/p7EQ7BruKdmYp/6Q2qSQgtO9cwvOmynVvNPNUcZp5B7O7OBrrl
xq13E14q+CNG6RXqWj1xk87dV1auHlTI8MfNixWQEpcXaLuLbIMl/3mtmRG82gKo
uSOvIjkgFZpFjfOwgGtjZvyDXQ9tUVokS0mCpu+ijqYUfReKcKv0QhtA6bojmibn
XS9G3sV5Dz0TO/tHh9n3xRe3JrEnKcp+TlP3SYiFzkMxEdxYZ6nXsTrJLvReK3iQ
VQzkFBRccJ0RS/WlO+nKlBKfsb6MGoTk7vZDpHvWsURwjxAnkB1fWSlYY+NT7i7C
M1eoP/05+nWIquGYxxt4lUBPEWSy7ZK82IZe/CU9bCSC02U2+zZvWDSz4ocGi/1o
8v1uit/+yTlf9oAf/roFYC73M7OKQp04Y1YE7CxmVEHTSQ5tq59QEJeX0kmwJU1A
0IrkdKsEeIjoo950jCY6DplocHxULry8ECPLvwqRJCZgBA+442qJp/NE0NmNjlOn
Zj81Gy64IxTvWgYivt3c+CUWISzvwlczp3T7twNf8H8hkJM/j/zj7mLkedXS4oa3
mSqI0REUzVcOTWNkT0tF
=ul7m
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-23 Thread Thorsten Behrens
Daniel Pocock wrote:
> Would it be problematic for core to have an OpenMAMA dependency
> though?  OpenMAMA is not available on all platforms.
> 
Not in general, nope. For some platforms (e.g. Windows), we tend to
ship builtin versions for a number of platform libraries, so that
would work with openmama, too. I see the website claims windows
support. There is a slight catch though with the license, it is
possible that the odd AppStore ToS here or there would prevent
shipping of LGPL-licensed code.

> My only concern would be performance - if somebody uses this to get a
> single currency and they manually refresh the quote, it is not an
> issue.  If somebody builds a more elaborate spreadsheet with dozens of
> currencies and they want live refreshes and recalculation of their
> entire spreadsheet then a C or C++ solution may be better for them.
> 
For highspeed traders, clearly an in-core C++ implementation would be
best. Dunno what you're targetting here. Everybody else would prolly
be fine with an extension (in whatever language), I'm relatively
certain network latencies will dominate in this game. ;)

HTH,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data

2013-11-23 Thread Markus Mohrhard
Hey,


2013/11/23 Thorsten Behrens 

> Daniel Pocock wrote:
> > Would it be problematic for core to have an OpenMAMA dependency
> > though?  OpenMAMA is not available on all platforms.
> >
> Not in general, nope. For some platforms (e.g. Windows), we tend to
> ship builtin versions for a number of platform libraries, so that
> would work with openmama, too. I see the website claims windows
> support. There is a slight catch though with the license, it is
> possible that the odd AppStore ToS here or there would prevent
> shipping of LGPL-licensed code.
>
> > My only concern would be performance - if somebody uses this to get a
> > single currency and they manually refresh the quote, it is not an
> > issue.  If somebody builds a more elaborate spreadsheet with dozens of
> > currencies and they want live refreshes and recalculation of their
> > entire spreadsheet then a C or C++ solution may be better for them.
> >
> For highspeed traders, clearly an in-core C++ implementation would be
> best. Dunno what you're targetting here. Everybody else would prolly
> be fine with an extension (in whatever language), I'm relatively
> certain network latencies will dominate in this game. ;)
>
>
>
Just as note. Checkout Matus' nice work in this area with the new streaming
interface into calc. It will be available in 4-2. You can find it in the
Data Menu.

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: real-time financial data (howto)

2013-11-26 Thread Daniel Pocock


On 23/11/13 20:54, Michael Meeks wrote:
> 
> On Sat, 2013-11-23 at 15:15 +0100, Daniel Pocock wrote:
>>> Would you be interested in working on integrating such a thing?
>>
>> Yes, that is why I'm looking at it
> 
>   Cool - so there is a lot we want to do here in calc. The initial work
> on that is in master:
> 
>   Data->Streams - I attach a screenshot.


Great - that looks like it may be the right place for this work

I made up a diagram and published it on my blog, I made sure LibreOffice
is mentioned too:

http://danielpocock.com/real-time-streaming-market-data-with-free-open-source-software

> 
>   Matus has a chunk of work to better manage data streams, and how
> they're processed / visualised. I'd personally like to see a clear
> separation between data source:
> 
> src:  http[s] | shell-script | spreadsheet-cells
> format: csv, A1


Here we would need to add an extra choice, to source the data from OpenMAMA

Sourcing data from RRDtool may be cool as well and if the HTTP method
could fetch Ganglia XML feeds from gmetad (port 8652) that could also be
quite useful


>   And finally how those cells move over time as new data comes to get the
> time series in.

This would probably need to work in a few different ways

Some sources (e.g. OpenMAMA or RRD files) are constantly updating.
OpenMAMA ticks arrive at a non-deterministic interval, while RRD updates
are at a constant interval.

Sometimes the user may just want to poll manually (on spreadsheet
refresh) or use some defined interval (e.g. every 5 minutes) to avoid
excessive computation effort.

>> Would it be problematic for core to have an OpenMAMA dependency
>> though?  OpenMAMA is not available on all platforms.
> 
>   In general with these dependencies we try to de-couple stuff.
> 
>> It would be possible in Java - after all, OpenMAMA provides a Java API
>> and it is packaged too:
> 
>   And we try to avoid new Java dependencies in the core - as an extension
> (fine) - but there are plenty of limits to extensions - and particularly
> around performance you want to be C++ for bulk data transfers (cf. the
> issues in base).
> 
>   In general we try to look for and dlopen system libraries that may not
> be there. As an alternative we provide a clean internal abstraction and
> distribute a dll that hard links to this system OpenMAMA thing - but (of
> course) if it is not there then dlopening our own library will fail.
> 
>   Then again - how complex is this API going to be ? :-)
> 

See the bottom of my blog (link above) for sample code in both C++ and Java


>   Either way - you'd want to hack on the data streams code; Matus is
> about to merge some biggish improvements there next week.
> 
>   But - from my perspective - I'd -love- to have OpenMAMA support - it's
> great to hear about you guys, and I'd love to bundle it in the default
> install if possible: big data is something Calc is about to get rather
> good at in 4.2  =)

I'm just on the fringes of the OpenMAMA effort, packaging it for Debian
- big thanks go to the developers at Wombat and NYSE who obviously put
many years work into that code and decided to release it as an open
source project through the Linux Foundation.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice