A Big Order: Stock Exchange

Programmers Guild

Moderator: Andreas the Wise

Post Reply
User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

A Big Order: Stock Exchange

Post by Andreas the Wise »

Alrightee then. Time to do one of the few possible forms of micronational investment - spending large amounts of money to buy the software to run a shop that you hope will eventually make even larger amounts of money for its owner.

I would like to start a Stock Exchange. I've vaguely mentioned this before, but I've decided this time I'm serious and hopefully in this post I will be able to detail just about everything I could possibly want it in. Recent advancing in banking software should make the majority of this easy to create. Now, what you want to know first and foremost - price. I'm willing to pay between 2000 and 5000 :erb , depending on the eventual quality of the program, features included, and whether or not that payment includes extra modifications in the future or not. I shall be on LOA from the 1st to the 17th of July on a series of camps, and might get on once a week or so (for consultation on its current progress). So I'm telling you what I want now, so that perhaps when I'm back, you'll have a working model ready.

I'll go through the features I want in order of importance. You don't need to have all of them up at the same time - it could run with about half of this and admin modification for the rest, but eventually I'd like as much automated as possible.

Bank - I want a bank feature the same as Shirebank, where users have a password protected account. It does not need regions or countries. From their bank page, users should be able to buy and sell shares in listed companies at a set price. Ideally, two set prices - the price to buy at should be 1% or a given number higher than the price to sell at, to avoid endless wealth creation. This buying and selling should be able to be done without any admin intervention or approval - effectively, it is buying and selling with the computer.

Companies - From the admin account, it should be possible to create and delete companies. Companies are created with a starting price and number of available shares, which differ for each company. Users can then begin buying and selling these shares at that price. If a user tries to buy more shares than a company has left, they should get an error message informing them of this.
The admin account should also have the ability to create and delete funds for users (starting funds will be given based on a payment in Erb)

On a separate page (similiar to the System Stats page), which should be available from the front page without being logged in (or even better, automatically display on the front page), each company should be listed, with its code, its current buy and sell price, the total amount of stocks available, the amount of stocks currently unsold, and the latest change in price.

That change in price is set from the admin page. Every week (or thereabouts), the admin should be able to click on a 'change price' function, and enter a number next to each company currently trading. That number will be a percentage, and the company price will change by that percentage. That percentage change will then be displayed on the front page. (I shall have a formula for how to calculate the percent changes, but it'll involve factors like MITO trade and company development, and so its easiest if I just type in the overall result, and then I can change the formula used if I need to without reprogramming the bank).

The above are the absolute necessary basic features. The below features are ones I would also like, where possible, but aren't absolutely necessary.

Every time a certain number of shares in a company are bought or sold, the price should change, either upwards or downwards, reflecting this. This change should be automatic, and separate from the weekly changes. If one of these changes occurs, it's % change should be shown on the front page, not that weeks.

On a users page, they should have displayed how much money they have, and how many shares they own in each company. Next to each company should also be a description of their relationship with it - if they are one of multiple shareholders, display: Shareholder; if they are the major shareholder but own < 50%, display Major Shareholder; if they own more than 50%, display CEO; if they own 100%, display; Taken Over.

Each company should have a page viewable by clicking on their code. It should include a brief description of the company, a list of the resources they manage, and a record of transactions with that company. It should also display a list of shareholders, ordered by the number of shares they hold. The Description and Resources should be variables which can be added and edited by the admin when creating companies.

On the main page, there should be a 'Rich List', which displays the top ten accounts, ordered by total assets (money + shares owned x selling price) and a second list 'Top Investors' ordered by total money alone.

Users should have the ability to buy shares off eachother. From their account, they can select to buy shares, select a particular person to buy from, and enter a price offerred. When that person logs on, they should receive notification they have had an offer on their shares, and be able to accept or decline it. Shares and money should then be exchanged between them automatically, on the clicking of 'accept'. The public price of the share should adjust based on a formula based on the number of shares exchanged, and the price they were exchanged at.

Companies should be able to be 'taken over'. If a user purchases 100% of shares in a company, and is owner in another company, they should be able to take over the company they have 100% of shares in. The shares in that company will then become shares in the new company, owned by that person, such that the total wealth of shares is the same. This feature will be hard to implement and may need to be done that admin can edit to arrange this, instead of users clicking a button and it happening automatically.

Depending on how close you are in Shirebank to getting multiple currencies, this could be programmed so it is in the same database as Shirebank. If this is the case, users will have a feature to "buy stock money" and exchange erbs into stock money at a set rate. The erbs then go to the VBNC account, and the users are automatically credited with "stock money" created out of nowhere. Users will not be able to exchange stock money for erb (because the stock money can be created and destroyed very easily, which is precisely the reason I'm using a different type of money to do it with than erb). If you'd prefer to keep them apart, I'll just do this via the admin account in the stock exchange.

As a final feature, companies should be able to give out a dividend every month or two based on a formula which I have yet to decide. This dividend should automatically be paid into owners money accounts. I'll think more on this later, as its the last feature I need, and will probably be months off implementing.

There, that's all the features I would ultimately want. Some might be impossible, some might take months to implement, but I'll work with what I can get. I hope that this program, when done, will help add an interesting new element to the Small Commonwealth United Economy. The above doesn't explain all the fine details about what users can do to affect the admin made price changes etc - its just a list of programming features required. The full explanation will come after I have a working model. I know some micronations had their whole economy just a stock exchange - I don't think that would work. But adding a stock exchange to our existing economy seems fun, and, I eventually hope, it will end up just as much of a cash cow as SCIRA :thumbsup
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

User avatar
Kostalan Rottsaa
Posts: 160
Joined: Sat Jun 20, 2009 4:13 pm

Re: A Big Order: Stock Exchange

Post by Kostalan Rottsaa »

Andreas the Wise wrote: If this is the case, users will have a feature to "buy stock money" and exchange erbs into stock money at a set rate. The erbs then go to the VBNC account, and the users are automatically credited with "stock money" created out of nowhere.
Mmm... :-/

Otherwise, this is outside my skill, but I'm fairly certain all portions of this are possible, albeit a good bit time-consuming considering your requests.
Kostalan Rottsaa
Duke of Brookshire

Count of Asantelian
Count of McCallavre
Count of Lesser Attera
Swnndyrrr Ytteirsal
Bocaj: You are the Spiral Nemesis, Reynardine! You are the end of all things!
HEIL KAISER!

Erik Mortis
Posts: 7238
Joined: Thu Oct 02, 2003 10:37 pm
Location: County of Monty Crisco
Contact:

Re: A Big Order: Stock Exchange

Post by Erik Mortis »

I'm sure this could easily be integrated with the bank, but I'm not sure I have the time or energy to try.

I'm still working the bank up...

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

Of course, do the announced mods to the bank first. But when you have spare time, or decide you'd like another couple thousand erb for the Monty Crisco war chest, you can start working on this. :thumbsup
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

User avatar
Kaiseress Anandja I
Posts: 695
Joined: Mon May 18, 2009 2:47 pm

Re: A Big Order: Stock Exchange

Post by Kaiseress Anandja I »

Will companies be able to reserve a stock majority for one owner, thereby making it only possible to buy a share of the company, but not take it over? If that is not possible, Lamifo will for example not be traded on this exchange.

And as soon as I posted that I realised that I will be owning a majority to begin with, and I don't have to sell. So, disregard the question. :p
Love and Happiness,

Kaiseress Anandja I
Marchioness of Goldshire
Baroness of Lakhesis

User avatar
Kostalan Rottsaa
Posts: 160
Joined: Sat Jun 20, 2009 4:13 pm

Re: A Big Order: Stock Exchange

Post by Kostalan Rottsaa »

Um....I could theoretically learn php and try my hand at this in a standalone version first. Might take me a little while though...
Kostalan Rottsaa
Duke of Brookshire

Count of Asantelian
Count of McCallavre
Count of Lesser Attera
Swnndyrrr Ytteirsal
Bocaj: You are the Spiral Nemesis, Reynardine! You are the end of all things!
HEIL KAISER!

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

Kaiseress Anandja I wrote:Will companies be able to reserve a stock majority for one owner, thereby making it only possible to buy a share of the company, but not take it over? If that is not possible, Lamifo will for example not be traded on this exchange.

And as soon as I posted that I realised that I will be owning a majority to begin with, and I don't have to sell. So, disregard the question. :p
My original intention is to do this for 'fictional' resource companies. By fictional I mean they don't actually do anything OOC, but IC they're the ones who mine and grow and acquire all the stuff we trade. Part of the thing that participants do is they're allowed to develop those resources companies, and that's a good way of ensuring the price goes up (the ultimate goal being to acquire immense wealth, which will, after an as yet indeterminate time interval, be allowed to be traded back by one person only for 10 000 :erb ).

If it takes off, I could eventually consider trading 'real' companies on it, but I'll get it running with fictional first.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

Any advances on this?
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

Erik Mortis
Posts: 7238
Joined: Thu Oct 02, 2003 10:37 pm
Location: County of Monty Crisco
Contact:

Re: A Big Order: Stock Exchange

Post by Erik Mortis »

I've been pondering it.. but not getting very far.

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

Yay, I knew I had my plans for this somewhere. Now I know php, it seems quite workable. :angel
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

Erik Mortis
Posts: 7238
Joined: Thu Oct 02, 2003 10:37 pm
Location: County of Monty Crisco
Contact:

Re: A Big Order: Stock Exchange

Post by Erik Mortis »

now that I have ideas. I could integrate it into the bank as a mod...

Erik Mortis
Posts: 7238
Joined: Thu Oct 02, 2003 10:37 pm
Location: County of Monty Crisco
Contact:

Re: A Big Order: Stock Exchange

Post by Erik Mortis »

Code: Select all

DB_TABLE_STOCK (6)
owner (text) ->Corrisponds to 'username' entry in DB_TABLE_ACCOUNT
company (text) ->corrisponds to 'username' entry in DB_TABLE_ACCOUNT with 'type' == 'Company'
quantity (text)
cost (text) ->What it was bought for.
price (text) ->what it is being sold for. (if it's for sale)
status (text) ->status of the stock see list below

DB_STOCK_LOG (8)
id (uint) (auto_increment)
instigator (text)
buyer (text)
seller (text)
company (text)
price (text)
quantity (text)
date (text)

///Stock Status List///
Offered -> May be purchased for the listed price.
Held -> Not for sale.
Inactive -> May not be sold. Not displayed. Company may be dead.
Some initial table lay outs I had in mind.

Andreas, since you are still working on ATTILLA, I'm gonna get started on this since it's part of the bank. I'd like to get at least basically functionality working within the week. If you wanna take over the project at that point, then you can.

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

Oh, I wanted to do it so it could be run by VBNC - it seemed a good money-making scheme.

Tell you what. Let's share it. :thumbsup I'll try and catch you on chat and talk about the fine details a little more soon. If you can get the basic stuff integrated into the bank (my thoughts currently where to have a 'stock menu' similar to the 'user menu', that only displays when you click 'manage your stocks' from the user menu. All the stock functionality would then be handled from there. And add a separate currency for use with stocks - an essential feature of how I intend to have prices working)
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

Erik Mortis
Posts: 7238
Joined: Thu Oct 02, 2003 10:37 pm
Location: County of Monty Crisco
Contact:

Re: A Big Order: Stock Exchange

Post by Erik Mortis »

Oh gods.. Not another currency! Seriously. We made the SCUE so we only had one.

User avatar
Andreas the Wise
Posts: 5253
Joined: Sat Oct 27, 2007 10:41 pm
Location: The Island of Melangia, Atterock, Kildare
Contact:

Re: A Big Order: Stock Exchange

Post by Andreas the Wise »

The separate currency would only be of use in the stock exchange, and allows us to create and destroy it at will.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy

And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).

Post Reply

Return to “Church of the Machine God”

Who is online

Users browsing this forum: No registered users and 2 guests