agent-based model

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

agent-based model

Simone Gogna
Hi all,
is there anyone able to give me some indications about R and agent-based modeling?
I am looking forward to build an agent-based model of a simple stock market for my master thesis to evaluate the effect of high-frequency trading activity.

In  very general terms  it may go as follows:

1) create two different kind of agent, i.e. high-frequency traders and value-investors, each one with its own trading strategy

2) the two category of agents interact and this provoke stock price fluctuations

Since I took a course on R and I am quite familiar with it (at least to make time series analysis), I was wondering whether it could be possible to use R to this purpose.
If, to your knowledge, there exist some specific book or some already existing model that use R to create agent-based model of financial markets, I will be very willing to take a look at them.

I am really sorry if this is not the right place to ask for this kind of question.
I am not able at this very moment of my work to give you any reproducible code for example since I don’t even know if it is possible to use R for this kind of work.

thanks and best regards,
Simone Gogna
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: agent-based model

mark leeds
hi: marcos lopzx deprado has a book "advances in HF strategies".
In the first chapter, he gives a reasonably straightforward example of
an agent based model. He doesn't show the code and I doubt he used  R but
it seems like R coujld be definitely used to recreate what he did there. I
don't know of R packages that do it ( there are
too many variations that are not generalizable but who knows.
maybe there is one ) but R can be used to program his agent based approach.
I assume by agent based, you are referring to a market microstructure type
model where  you have buyers and sellers entering the book at different
rates etc.

I'm not recommending marcos's  book only because I haven't gone through it
completely but I did read the first chapter and thought his  example was
interesting. It's a re-illustration of a model developed by ohara and
easley, I think. you can email marcos also. He's
a very knowledgable, generous and helpful person. if you need his email
addresss, ask me offline and I'll send it to you.























On Thu, Oct 4, 2012 at 12:23 PM, Simone Gogna <[hidden email]>wrote:

> Hi all,
> is there anyone able to give me some indications about R and agent-based
> modeling?
> I am looking forward to build an agent-based model of a simple stock
> market for my master thesis to evaluate the effect of high-frequency
> trading activity.
>
> In  very general terms  it may go as follows:
>
> 1) create two different kind of agent, i.e. high-frequency traders and
> value-investors, each one with its own trading strategy
>
> 2) the two category of agents interact and this provoke stock price
> fluctuations
>
> Since I took a course on R and I am quite familiar with it (at least to
> make time series analysis), I was wondering whether it could be possible to
> use R to this purpose.
> If, to your knowledge, there exist some specific book or some already
> existing model that use R to create agent-based model of financial markets,
> I will be very willing to take a look at them.
>
> I am really sorry if this is not the right place to ask for this kind of
> question.
> I am not able at this very moment of my work to give you any reproducible
> code for example since I don’t even know if it is possible to use R for
> this kind of work.
>
> thanks and best regards,
> Simone Gogna
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: agent-based model

Jeffrey Ryan
>From R/Finance 2010 (and 2011), Michael North gave a few talks.

http://www.rinfinance.com/agenda/2010/MichaelNorth.pdf

Repast Simphony (he is the lead dev on the project from Argonne) is
what he uses and has connectors to/from R.

I have no personal experience with this package though.

Jeff

On Thu, Oct 4, 2012 at 11:45 AM, Mark Leeds <[hidden email]> wrote:

> hi: marcos lopzx deprado has a book "advances in HF strategies".
> In the first chapter, he gives a reasonably straightforward example of
> an agent based model. He doesn't show the code and I doubt he used  R but
> it seems like R coujld be definitely used to recreate what he did there. I
> don't know of R packages that do it ( there are
> too many variations that are not generalizable but who knows.
> maybe there is one ) but R can be used to program his agent based approach.
> I assume by agent based, you are referring to a market microstructure type
> model where  you have buyers and sellers entering the book at different
> rates etc.
>
> I'm not recommending marcos's  book only because I haven't gone through it
> completely but I did read the first chapter and thought his  example was
> interesting. It's a re-illustration of a model developed by ohara and
> easley, I think. you can email marcos also. He's
> a very knowledgable, generous and helpful person. if you need his email
> addresss, ask me offline and I'll send it to you.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Oct 4, 2012 at 12:23 PM, Simone Gogna <[hidden email]>wrote:
>
>> Hi all,
>> is there anyone able to give me some indications about R and agent-based
>> modeling?
>> I am looking forward to build an agent-based model of a simple stock
>> market for my master thesis to evaluate the effect of high-frequency
>> trading activity.
>>
>> In  very general terms  it may go as follows:
>>
>> 1) create two different kind of agent, i.e. high-frequency traders and
>> value-investors, each one with its own trading strategy
>>
>> 2) the two category of agents interact and this provoke stock price
>> fluctuations
>>
>> Since I took a course on R and I am quite familiar with it (at least to
>> make time series analysis), I was wondering whether it could be possible to
>> use R to this purpose.
>> If, to your knowledge, there exist some specific book or some already
>> existing model that use R to create agent-based model of financial markets,
>> I will be very willing to take a look at them.
>>
>> I am really sorry if this is not the right place to ask for this kind of
>> question.
>> I am not able at this very moment of my work to give you any reproducible
>> code for example since I don’t even know if it is possible to use R for
>> this kind of work.
>>
>> thanks and best regards,
>> Simone Gogna
>>         [[alternative HTML version deleted]]
>>
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



--
Jeffrey Ryan
[hidden email]

www.lemnica.com

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: agent-based model

geoff
In reply to this post by Simone Gogna
Simone,

Interesting topic for a master's thesis. There is a lot of information out
there but for a simple introduction and an example that you can get
working in a couple of hours, try reading the article:

R as a Simulation Platform in Ecological Modelling

http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf

It is not a financial market but it will give you the necessary tools to
build one. I personally found this article to be one of the more intuitive
explanations out there.

Geoff


 > Hi all,

> is there anyone able to give me some indications about R and agent-based
> modeling?
> I am looking forward to build an agent-based model of a simple stock
> market for my master thesis to evaluate the effect of high-frequency
> trading activity.
>
> In  very general terms  it may go as follows:
>
> 1) create two different kind of agent, i.e. high-frequency traders and
> value-investors, each one with its own trading strategy
>
> 2) the two category of agents interact and this provoke stock price
> fluctuations
>
> Since I took a course on R and I am quite familiar with it (at least to
> make time series analysis), I was wondering whether it could be possible
> to use R to this purpose.
> If, to your knowledge, there exist some specific book or some already
> existing model that use R to create agent-based model of financial
> markets, I will be very willing to take a look at them.
>
> I am really sorry if this is not the right place to ask for this kind of
> question.
> I am not able at this very moment of my work to give you any reproducible
> code for example since I don’t even know if it is possible to use R for
> this kind of work.
>
> thanks and best regards,
> Simone Gogna
> [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: agent-based model

Worik Stanton
In reply to this post by Simone Gogna
On 05/10/12 05:23, Simone Gogna wrote:
> Hi all,
> is there anyone able to give me some indications about R and agent-based modeling?
> I am looking forward to build an agent-based model of a simple stock market for my master thesis to evaluate the effect of high-frequency trading activity.

FWIW I do not think R is well suited to this task

I only have a little experience with agent based modelling, but  IMO a
language with better support for data structures would be more suited.
I would lean to C++ (as I know it) but I am sure Java would be a fine
language for your needs.

R is ideal for processing the output of such a model.

cheers
Worik


> In  very general terms  it may go as follows:
>
> 1) create two different kind of agent, i.e. high-frequency traders and value-investors, each one with its own trading strategy
>
> 2) the two category of agents interact and this provoke stock price fluctuations
>
> Since I took a course on R and I am quite familiar with it (at least to make time series analysis), I was wondering whether it could be possible to use R to this purpose.
> If, to your knowledge, there exist some specific book or some already existing model that use R to create agent-based model of financial markets, I will be very willing to take a look at them.
>
> I am really sorry if this is not the right place to ask for this kind of question.
> I am not able at this very moment of my work to give you any reproducible code for example since I donâEUR^(TM)t even know if it is possible to use R for this kind of work.
>
> thanks and best regards,
> Simone Gogna
> [[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

--
it does not matter                      I think that I shall never see
how much I dig and dig                    A billboard lovely as a tree
this hole just                      Indeed, unless the billboards fall
keeps getting deeper                      I'll never see a tree at all


        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: agent-based model

Patrick Burns-2

On 05/10/2012 00:06, Worik Stanton wrote:

> On 05/10/12 05:23, Simone Gogna wrote:
>> Hi all,
>> is there anyone able to give me some indications about R and agent-based modeling?
>> I am looking forward to build an agent-based model of a simple stock market for my master thesis to evaluate the effect of high-frequency trading activity.
>
> FWIW I do not think R is well suited to this task
>
> I only have a little experience with agent based modelling, but  IMO a
> language with better support for data structures would be more suited.
> I would lean to C++ (as I know it) but I am sure Java would be a fine
> language for your needs.

I both agree with this and disagree with it.

If you are in the just playing around stage
and don't know what you want to do, then R
is a very good place to do it.  Once you do
know what you are doing, then another language
(such as C++) will be better.  But I would
say the binding constraint would be speed
rather than data structures.

Of course if what Jeff pointed to fits the bill,
then even better.

>
> R is ideal for processing the output of such a model.

Wholly agree.

Pat

>
> cheers
> Worik
>
>
>> In  very general terms  it may go as follows:
>>
>> 1) create two different kind of agent, i.e. high-frequency traders and value-investors, each one with its own trading strategy
>>
>> 2) the two category of agents interact and this provoke stock price fluctuations
>>
>> Since I took a course on R and I am quite familiar with it (at least to make time series analysis), I was wondering whether it could be possible to use R to this purpose.
>> If, to your knowledge, there exist some specific book or some already existing model that use R to create agent-based model of financial markets, I will be very willing to take a look at them.
>>
>> I am really sorry if this is not the right place to ask for this kind of question.
>> I am not able at this very moment of my work to give you any reproducible code for example since I donâEUR^(TM)t even know if it is possible to use R for this kind of work.
>>
>> thanks and best regards,
>> Simone Gogna
>> [[alternative HTML version deleted]]
>>
>>
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
>
>
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

--
Patrick Burns
[hidden email]
http://www.burns-stat.com
http://www.portfolioprobe.com/blog
twitter: @portfolioprobe

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.