Re: Simple Stock Options Calculation
- To: mathgroup at smc.vnet.net
- Subject: [mg105571] Re: [mg105543] Simple Stock Options Calculation
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Wed, 9 Dec 2009 05:44:32 -0500 (EST)
- References: <200912081143.GAA29161@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
I'd prefer something like pricepercontract = .71; feepercontract = .75; tradecomission = 9.99; totalcost = 25000; limit = Rationalize[ 100*pricepercontract*numbercontracts*feepercontract + tradecomission <= totalcost] Maximize[{numbercontracts, limit}, numbercontracts, Integers] 999/100 + (213 numbercontracts)/4 <= 25000 {469, {numbercontracts -> 469}} Bobby On Tue, 08 Dec 2009 05:43:30 -0600, Nicholas Kormanik <nkormanik at gmail.com> wrote: > > Trying to set up way to find the number of options contracts one can > purchase with a given amount of money. Could someone please edit the > code if needed? Or does this look okay as is? > > Thanks..... > > > pricepercontract := .71 > numbercontracts := x > feepercontract := .75 > tradecomission := 9.99 > totalcost := 25000 > > Solve[100*pricepercontract*numbercontracts*feepercontract + > tradecomission == totalcost, x] > > > > -- DrMajorBob at yahoo.com
- References:
- Simple Stock Options Calculation
- From: Nicholas Kormanik <nkormanik@gmail.com>
- Simple Stock Options Calculation