FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-04-2010, 06:05 AM
Long Wind
 
Default need advice on a solution

(sorry, this is not Linux specific)
I trade stocks. I put stock prices in file. Often I need compute PE
for each day. To cope with stock split, I need to recompute prices as
if un-split. Sometimes to compute PE, I want to use average of the
last three years' earning

To complete these tasks

Solution 1: is it possible to use spreadsheet? OpenOffice or other?

Solution 2: use mysql? Only sql commands? without a programming
language like jdbc?

Solution 3: programming in java. I find it clumsy.

I am familiar with java, no training is required for solution 3
For solution 1 and 2, I have to learn spreadsheet, sql and/or jdbc


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikUVE-figFWzw6zx99GPjLJBncJnmtmpsDo20os@mail.gmail.com"> http://lists.debian.org/AANLkTikUVE-figFWzw6zx99GPjLJBncJnmtmpsDo20os@mail.gmail.com
 
Old 10-04-2010, 06:31 AM
Ron Johnson
 
Default need advice on a solution

On 10/04/2010 01:05 AM, Long Wind wrote:

(sorry, this is not Linux specific)
I trade stocks. I put stock prices in file. Often I need compute PE
for each day. To cope with stock split, I need to recompute prices as
if un-split. Sometimes to compute PE, I want to use average of the
last three years' earning

To complete these tasks

Solution 1: is it possible to use spreadsheet? OpenOffice or other?



Probably not, since the task is too complicated.


Solution 2: use mysql?


Not that evil pseudo-RDBMS, which wouldn't know data and relational
integrity from cr@p.


PostrgeSQL is *the* way to go, though it will take a bit more
up-front effort to learn what to do.



Only sql commands?


Certainly not plain INSERT, UPDATE, DELETE and SELECT statements,
but PostgreSQL has the powerful PL/pgSQL.



without a programming
language like jdbc?



jdbc is an API not a language.


Solution 3: programming in java. I find it clumsy.



Why limit yourself to Java? Perl and Python are up to the task, as
are C++ and FreePascal. (Yes, I'm pointedly ignoring C.)



I am familiar with java, no training is required for solution 3
For solution 1 and 2, I have to learn spreadsheet, sql and/or jdbc



SQL itself isn't difficult to learn. What you need is a clear head
(to see the whole problem) and to learn some data modeling skills.


Actually, DM skills will help you with non-database programming,
since what you get out of it are planning and design.


--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA974D1.5010501@cox.net">http://lists.debian.org/4CA974D1.5010501@cox.net
 
Old 10-04-2010, 06:47 AM
Doug
 
Default need advice on a solution

On 10/04/2010 02:05 AM, Long Wind wrote:

(sorry, this is not Linux specific)
I trade stocks. I put stock prices in file. Often I need compute PE
for each day. To cope with stock split, I need to recompute prices as
if un-split. Sometimes to compute PE, I want to use average of the
last three years' earning

To complete these tasks

Solution 1: is it possible to use spreadsheet? OpenOffice or other?

Solution 2: use mysql? Only sql commands? without a programming
language like jdbc?

Solution 3: programming in java. I find it clumsy.

I am familiar with java, no training is required for solution 3
For solution 1 and 2, I have to learn spreadsheet, sql and/or jdbc



I haave always hated spread-sheets because of the clumsy way you have to
enter
equations, but I am forced to admit that for the type of thing you want
to do, they
probably can't be beat by anything simple--which is to say, you'd have
to write
some software. The spread sheet in Open Office ought to work fine.
Learning to
use it is not difficult, but it takes a different approach to variable
notation, and

that takes some getting used-to. --doug

--
Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA9788E.3020201@optonline.net">http://lists.debian.org/4CA9788E.3020201@optonline.net
 
Old 10-04-2010, 06:49 AM
Long Wind
 
Default need advice on a solution

Thank Ron Johnson !
I probably won't waste time on learning spreadsheet.

I am new to Perl and Python. (A lot of training required!)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin3O9JGiZ=ey6nfuAR+1X2yPbcH_SQncBQCjsdS@mail .gmail.com">http://lists.debian.org/AANLkTin3O9JGiZ=ey6nfuAR+1X2yPbcH_SQncBQCjsdS@mail .gmail.com
 
Old 10-04-2010, 06:59 AM
Long Wind
 
Default need advice on a solution

I'm rather confused.
Another user Ron just say the opposite.
Suppose stock prices in an array (or table or database)
and annual earnings of 10 years in another array (or table or database)

to compute PE using average of last 3 years
is like writing a program

Can spreadsheet really do the job?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinGctx8i+NoBkeuuVFrLPdMNM8a5UCAOxLQrsVK@mail .gmail.com">http://lists.debian.org/AANLkTinGctx8i+NoBkeuuVFrLPdMNM8a5UCAOxLQrsVK@mail .gmail.com
 
Old 10-04-2010, 07:15 AM
Doug
 
Default need advice on a solution

On 10/04/2010 02:59 AM, Long Wind wrote:

I'm rather confused.
Another user Ron just say the opposite.
Suppose stock prices in an array (or table or database)
and annual earnings of 10 years in another array (or table or database)

to compute PE using average of last 3 years
is like writing a program

Can spreadsheet really do the job?




You'll have to write the equations, but you can save the "go-to" and "for"
and "case of" commands, and stuff like that. (The go-to is ensconced
in the entry on the spread sheet--it's not really gone.) If you're
comfortable

programming--one of the responders mentioned Pascal, that's a nice
language--then by all means, write the program. It will probably be of
more generic use in the future. But it would seem to me that a spreadsheet
_would_ be capable of what you want to do. Just don't ask me to program it!
--doug



--
Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA97F07.7010801@optonline.net">http://lists.debian.org/4CA97F07.7010801@optonline.net
 
Old 10-04-2010, 07:33 AM
Doug
 
Default need advice on a solution

On 10/04/2010 03:15 AM, Doug wrote:

On 10/04/2010 02:59 AM, Long Wind wrote:

I'm rather confused.
Another user Ron just say the opposite.
Suppose stock prices in an array (or table or database)
and annual earnings of 10 years in another array (or table or database)

to compute PE using average of last 3 years
is like writing a program

Can spreadsheet really do the job?


You'll have to write the equations, but you can save the "go-to" and
"for"

and "case of" commands, and stuff like that. (The go-to is ensconced
in the entry on the spread sheet--it's not really gone.) If you're
comfortable

programming--one of the responders mentioned Pascal, that's a nice
language--then by all means, write the program. It will probably be of
more generic use in the future. But it would seem to me that a
spreadsheet
_would_ be capable of what you want to do. Just don't ask me to
program it!

--doug




Well I'm "replying" to my own post:

I suggested using a spread sheet because that's the sort of thing they were
designed to do: manipulate financial data. If you're going to do a lot
of that,

then you should learn to use spread sheets. (Some people are so
comfortable with them, they use spread sheets for things like schedules.)
Personally, however, if I had the problem, I would almost certainly
polish up my

Pascal and write a program. I just wanted to clear that up. --doug
a program

--
Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA98341.5000102@optonline.net">http://lists.debian.org/4CA98341.5000102@optonline.net
 
Old 10-04-2010, 12:08 PM
John Hasler
 
Default need advice on a solution

Ron Johnson writes:
> PostrgeSQL is *the* way to go...

For his purpose sqlite might be better.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87vd5ijh2o.fsf@thumper.dhh.gt.org">http://lists.debian.org/87vd5ijh2o.fsf@thumper.dhh.gt.org
 
Old 10-04-2010, 01:07 PM
Ron Johnson
 
Default need advice on a solution

On 10/04/2010 07:08 AM, John Hasler wrote:

Ron Johnson writes:

PostrgeSQL is *the* way to go...


For his purpose sqlite might be better.


I thought about that, but it's datatypes are only notional.

$ sqlite3 foo.db
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table bar (f1 integer);
sqlite> insert into bar values ('Hello, World');
sqlite> select * from bar;
Hello, World
sqlite>

--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA9D195.6020703@cox.net">http://lists.debian.org/4CA9D195.6020703@cox.net
 
Old 10-04-2010, 01:10 PM
Ron Johnson
 
Default need advice on a solution

On 10/04/2010 02:33 AM, Doug wrote:

On 10/04/2010 03:15 AM, Doug wrote:

On 10/04/2010 02:59 AM, Long Wind wrote:

I'm rather confused.
Another user Ron just say the opposite.
Suppose stock prices in an array (or table or database)
and annual earnings of 10 years in another array (or table or database)

to compute PE using average of last 3 years
is like writing a program

Can spreadsheet really do the job?



You'll have to write the equations, but you can save the "go-to" and
"for"
and "case of" commands, and stuff like that. (The go-to is ensconced
in the entry on the spread sheet--it's not really gone.) If you're
comfortable
programming--one of the responders mentioned Pascal, that's a nice
language--then by all means, write the program. It will probably be of
more generic use in the future. But it would seem to me that a
spreadsheet
_would_ be capable of what you want to do. Just don't ask me to
program it!
--doug




Well I'm "replying" to my own post:

I suggested using a spread sheet because that's the sort of thing they were
designed to do: manipulate financial data. If you're going to do a lot
of that,
then you should learn to use spread sheets. (Some people are so
comfortable with them, they use spread sheets for things like schedules.)
Personally, however, if I had the problem, I would almost certainly
polish up my
Pascal and write a program. I just wanted to clear that up. --doug
a program



The "problem" is that stock splits make your data model pretty
complex. Maybe a spreadsheet jockey could make it work, but it
would be hideous and opaque.


--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CA9D248.4010208@cox.net">http://lists.debian.org/4CA9D248.4010208@cox.net
 

Thread Tools




All times are GMT. The time now is 08:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org