gt;>>> should take less than hour to modify what I have for the trapezoid rule
>>>>>>> since it's just about defining the implicit function, NLsolve handles
>>>>>>> the
>>>>>>> solving).
>>>>>>>
>>&g
ier.
>
> Let me know what you guys would like to see on the differential equation /
> stochastic processes side and I'll make it happen. I'm doing most of this
> stuff for SPDEs in stochastic systems biology, but the equations are
> literally the same (general SDEs and semilinear Heat e
Yup, that did it. And wow is it fast.
*function testing(k::Vector)*
*return map((x::Float64) -> x^2, k)*
*end*
*@time testing(k)*0.07 seconds (7 allocations: 8.125 KB)
On Monday, August 1, 2016 at 12:25:59 PM UTC-4, David P. Sanders wrote:
>
> Don't do benchmarks in global scope.
Hi all! I am wondering if perhaps I am getting the syntax wrong with
respect to the proper way to do anonymous functions in 0.5. I am not
seeing any performance increase when using them as I expected.
For example:
*k = rand(1000)*
*@time map((x::Float64) -> x^2, k)*0.025886 seconds (12.55
I've also added some documentation
(http://quantlibjl.readthedocs.org/en/latest/) and some tests, but again,
this is still very much a work in progress! Let me know if anyone runs
into any issues!
Thanks!
Chris
On Tuesday, March 1, 2016 at 7:14:12 PM UTC-5, Christopher Alexander wrote:
>
>
t be accessible anywhere
else, right?
Chris
On Wednesday, March 23, 2016 at 3:39:10 PM UTC-4, new to Julia wrote:
>
> Thanks for your reply. Does it mean that calling files in Julia is
> impossible?
>
> On Wednesday, March 23, 2016 at 1:57:16 PM UTC-5, Christopher Alexander
>
How is test2 supposed to know what "c" is? It is only defined inside the
scope of the function "test", so it won't be accessible anywhere else.
Chris
On Wednesday, March 23, 2016 at 2:41:29 PM UTC-4, new to Julia wrote:
>
> I have a question for calling files in Julia:
>
> I have two jl files.
ris
On Monday, March 7, 2016 at 7:39:45 PM UTC-5, Christopher Alexander wrote:
>
> Many thanks, these are very helpful! Yes, the two vectors are going to be
> of the same type. The StructsOfArrays package is interesting too, as let's
> say you have a construction like this:
>
> *a
ataFrame columns -- watch how you use columns to keep type stability
>
> - Nx2 Array
>
> - Nx2 NamedArray:
> https://github.com/davidavdav/NamedArrays.jl
>
> - AxisArrays:
> https://github.com/mbauman/AxisArrays.jl
>
>
> On Mon, Mar 7, 2016 at 5:11 PM, Christ
.
> Also, see:
>
> https://github.com/simonster/StructsOfArrays.jl
>
> On Mon, Mar 7, 2016 at 4:50 PM, Christopher Alexander <uvap...@gmail.com
> > wrote:
>
>> Hello all, I need to create a structure where I keep track of pairs of
>> value => weight so th
)
>
>end
>
>
> julia> myT = TestType{A}(4.0)
>
> TestType{A}(4.0,#undef)
>
>
> julia> myT.b = A()
>
> A()
>
>
> julia> myT
>
> TestType{A}(4.0,A())
>
> On Friday, March 4, 2016 at 9:19:42 AM UTC-8, Christopher Alexander wrote:
&
Hi all,
Is there anyway to do something like the following?
abstract ABC
type A <: ABC end
type B <: ABC end
type TestType{T <:ABC}
a::Float64
b::T
TestType(a::Float64) = new(a)
end
myT = TestType(4.0)
myT.b = A()
I am wondering if you can incompletely
; Now I just have to learn Julia to have a look at your code :)
>>
>> Luigi
>>
>>
>> On Tuesday, March 1, 2016 at 7:56:45 AM UTC+1, Christopher Alexander
>> wrote:
>>>
>>> Thanks guys! I still have a lot of work to do regarding writing tests
>>
> On Tuesday, March 1, 2016 at 8:07:53 AM UTC-8, Christopher Alexander wrote:
>>
>> Thanks for the feedback all! I of course welcome any contributions and
>> collaboration to/with this package! Luigi, I'd be honored to have a link
>> to this package on the QuantLib s
lready got a nice body of code there!
>
> -viral
>
> On Monday, February 29, 2016 at 10:02:16 PM UTC+5:30, Christopher
> Alexander wrote:
>>
>> Hello all, I'd like to point people in the direction of a package I've
>> been working on: JQuantLib, to get some feedbac
Hello all, I'd like to point people in the direction of a package I've been
working on: JQuantLib, to get some feedback. Basically, I am trying to
write a version of the very popular open-source quantitative finance
library QuantLib in pure Julia. The library itself is written in C++, but
it
Sorry a bit off topic, but when you say anon functions are "fixed" in 0.5,
does that mean they have the same performance as defined functions (like if
you passed some defined function to filter for example)?
On Tuesday, February 9, 2016 at 11:37:36 AM UTC-5, Milan Bouchet-Valat
wrote:
>
> Le
Why couldn't you do something like this? It is type stable:
using Base.Dates
leapDay = isleapyear(yr) ? Date(yr, 2, 29) : Date()
if leapDay != Date()
doy = dayofyear( leapDay )
end
Again, Date() returns this: *0001-01-01*
It works nicely as a "null" date.
Chris
On Tuesday, February 9,
I really like that construction!
On Monday, February 8, 2016 at 10:49:41 PM UTC-5, Greg Plowman wrote:
>
> If only Nullables can be null, could we formally define this?
>
> isnull(x::Nullable) = x.isnull # already defined in nullable.jl
> isnull(x) = false # extra definition
For a null date, I usually just use Date() (Dates.Date()), which returns
Jan 1, 0001. Also, you know that there is already a method to check
whether or not a year is a leap year right?
Dates.isleapyear(y), returns a Bool.
http://docs.julialang.org/en/release-0.4/manual/dates/
On Monday,
Instead of having the name be ASCIIString, you could have that be another
type like SomeTypeName, (which then has the string "A" or "B" as an
attribute). Then you could do a type alias to map TypeA to
SomeType{SomeTypeA} and TypeB to SomeType{SomeTypeB} assuming SomeTypeA and
SomeTypeB are
Let's say I have the following types:
abstract ABC
type A <: ABC
a::Float64
end
type B{T <: ABC}
a::T
end
In some cases, I need for type "B" to be incompletely initialized so that I
can define its parameter "a" later. I've found out that you can do
something like this:
type
Kevin
>
> On Thu, Feb 4, 2016 at 8:10 AM, Christopher Alexander <uvap...@gmail.com
> > wrote:
>
>> Let's say I have the following types:
>>
>> abstract ABC
>>
>> type A <: ABC
>> a::Float64
>> end
>>
>> type B{T
sizeof(bA), sizeof(bABC)
> (4,8)
>
> Even though both 'B' objects contain an 'A' immutable, bABC keeps it as a
> pointer (size 8) whereas bA can directly unpack it into the definition.
>
>
> On Thursday, February 4, 2016 at 1:59:17 PM UTC-5, Christopher Alexander
> wrote:
&g
Try doing something like:
tic()
# my code
toc()
On Wednesday, February 3, 2016 at 3:28:28 PM UTC-5, Lytu wrote:
>
> Hello Julia users,
>
> Can someone tell me what's the equivalent of matlab elapsed cputime in
> Julia
>
> For example i Matlab, we can do this:
>
>t = cputime;
>x=4;
>
>
performance-tips/#separate-kernel-functions
>
> >> The kernel fn could be what Tom suggested
> >>
> >> nvp(myBond) = isdefined(myBond, :nvp_val) ? myBond.nvp_val
> :_nvp!(myBond,
> >> myBond.pricingEngine)
> >>
> >> _nvp!(bond, pe:Pri
, myBond's pricing engine still points to the older myPE with
TermStructureA.
On Monday, February 1, 2016 at 1:58:54 PM UTC-5, Christopher Alexander
wrote:
>
> So something like:
>
> function update_ts(pe::PricingEngine, newTS::TermStructure)
> newPE = PricingEngine(pe.varA,
> On Mon, Feb 1, 2016 at 1:27 PM, Christopher Alexander <uvap...@gmail.com
> > wrote:
>
>> Hello all, I have a question about the usage of parametric types. I know
>> these bring about a performance boost (at least that was my understanding),
>> but I
e dispatch a
> little more keep your PricingEngine and TermStructure separate:
>
> do_something(engine::PricingEngine, term::TermStructure) = ...
>
>
>
> On Mon, Feb 1, 2016 at 2:07 PM, Christopher Alexander <uvap...@gmail.com
> > wrote:
>
>> This doe
What is the arraypocalypse?
On Tuesday, February 2, 2016 at 1:28:26 AM UTC-5, Mauro wrote:
>
> > my tests run smoothly in the current build of julia 0.5 beta. Is
> everything
> > good or are there breaking changes to come?
>
> There are always breaking changes to come on Master... that's the
Hello all, I have a question about the usage of parametric types. I know
these bring about a performance boost (at least that was my understanding),
but I have a situation where I have a parametric type defined as such:
type PricingEngine{T <: TermStructure}
varA::Float64
varB::Float64
Yea, can someone explain the proper syntax here? What would be the case if
I wanted to build a callable type? What if I want to do something like
this?
call{T <: MyAbstractType)(t::T, a::Int) = t.a + a
Thanks!
Chris
On Sunday, January 31, 2016 at 4:27:00 AM UTC-5, Bryan Rivera wrote:
>
> I
Is this something that would really only be solved by proper
multi-threading?
On Saturday, January 30, 2016 at 12:49:50 PM UTC-5, Christopher Alexander
wrote:
>
> I can confirm that I do not see the seg fault issue in 0.5 (the latest
> master), but I am getting fundamentally differen
I have tried the construction below with no success. In v0.4.3, I end up
getting a segmentation fault. In the latest v.0.5.0, the run time is 3-4x
as long as the non-parallelized version and the array constructed is vastly
different than the one that is constructed using the non-parallelized
By "construction below", I mean this:
results = SharedArray(Float64, (m,n))
@sync @parallel for i = 1:n
results[:, i] = complicatedfunction(inputs[i])
end
On Saturday, January 30, 2016 at 2:31:40 PM UTC-5, Christopher Alexander
wrote:
>
> I have tried the construction below
I can confirm that I do not see the seg fault issue in 0.5 (the latest
master), but I am getting fundamentally different results when using the
@sync @parallel construction. In essence, @sync @parallel is causing
arrays of different values (compared to using a non-parallelized
construction)
at 4:54:18 PM UTC-5, Christopher Alexander
wrote:
>
> Hello all, I have a question about the proper usage of SharedArray /
> @parallel. I am trying to use it in a particular part of my code, but I am
> not getting the expected results (instead I am getting an array of zeros
> each
Hello all, I have a question about the proper usage of SharedArray /
@parallel. I am trying to use it in a particular part of my code, but I am
not getting the expected results (instead I am getting an array of zeros
each time).
Here are the two functions that are involved:
function
Milan,
Thanks for this! That is quite a difference, I might be making some
changes to my code!
Chris
On Thursday, January 28, 2016 at 5:36:07 AM UTC-5, Milan Bouchet-Valat
wrote:
>
> Le mercredi 27 janvier 2016 à 22:37 -0800, Christopher Alexander a
> écrit :
> > Try
I have some code (based somewhat on both Ito and BusinessDays), that is
part of a larger Quantlib implementation that I'm working on in Julia,
which deals with business days. You can check it out here:
I have some code (based somewhat on both Ito and BusinessDays), that is
part of a larger Quantlib implementation I'm working on in Julia, which
deals with business days and various financial calendars (so far just US
and UK). You can check it out here:
Try something like this:
adjCloseMuVec = Vector{Float32}(nFullYears)
or
adjCloseMuVec = zeros(Float32, nFullYears)
This will init a vector of the proper size. I think zeros is slightly
faster, but someone can correct me if that is not the case.
Chris
On Thursday, January 28, 2016 at 1:26:09
This is basically identical to a very recent issue on
here: https://groups.google.com/forum/#!topic/julia-users/3Hpll3j48Rg
That issue also involved the FixedEffectModels package, so maybe it's an
issue with that?
Chris
On Friday, January 22, 2016 at 7:30:34 PM UTC-5, Diogo Falcão wrote:
>
>
on, passedIn::Float64) =
> > my_func(fcn1, (y, z, passedin)->default_fcn(0.0, y, z, passedin),
> > passedIn)
> >
> > You could achieve the same effect in one definition if you put fcn2 as a
> > keyword argument. Also check out FastAnonymous.jl if performance
> matter
second function like this:
> ```
> my_func(fcn1::Function, passedIn::Float64) = my_func(fcn1,
> default_fcn, passedIn)
> ```
>
> -erik
>
>
> On Mon, Jan 18, 2016 at 4:02 PM, Christopher Alexander
> <uvap...@gmail.com > wrote:
> > Hello all, I had a que
Hello all, I had a question concerning a best practice in a particular case
of multiple dispatch which is as follows.
Let's say I have a function with two different methods.
function my_func(fcn1::Function,fcn2::Function, passedIn::Float64)
x = 0.0
y = 1.0
z = 2.0
val1 = fcn(x, y, passedIn)
In your user folder, you don't have a .julia folder? It is hidden, so you
might have to turn on hidden folders or access it via the command prompt.
If you are on a computer with a network drive, it might have put the
folder in there.
On Wednesday, January 13, 2016 at 10:36:51 AM UTC-5,
OK, I've gotten by this by doing:
*B{AbstractA}()*
... but it would be neat if I could just infer that type in the inner
constructor.
On Friday, January 1, 2016 at 5:06:33 PM UTC-5, Christopher Alexander wrote:
>
> Thanks! I'm having a bit of trouble with that setup when th
u call something like this with no issues:
pricing_engine = DiscountingBondEngine()
Then you can set the term structure later.
Julia is awesome.
Thanks!
Chris
On Friday, January 1, 2016 at 5:24:13 PM UTC-5, Christopher Alexander wrote:
>
> OK, I've gotten by this by doing:
>
to sprinkle some `isdefined(b, :ts)` in various places in
> your
> code.
>
> Happy New Year!
> --Tim
>
> On Friday, January 01, 2016 11:01:02 AM Christopher Alexander wrote:
> > I'm actually having a slight problem with this implementation.
> Basically,
> &g
in the first place?
Thanks!
Chris
On Friday, January 1, 2016 at 1:24:21 PM UTC-5, Christopher Alexander wrote:
>
> Thanks Tim, this is very helpful! Happy New Year!
>
> - Chris
>
> On Thursday, December 31, 2015 at 6:33:29 PM UTC-5, Tim Holy wrote:
>>
>> See
>>
in the first place?
Thanks!
Chris
On Friday, January 1, 2016 at 1:24:21 PM UTC-5, Christopher Alexander wrote:
>
> Thanks Tim, this is very helpful! Happy New Year!
>
> - Chris
>
> On Thursday, December 31, 2015 at 6:33:29 PM UTC-5, Tim Holy wrote:
>>
>> See
&
n
> afterwards. You'd be better off with
>
> type Bond{T<:TermStructure}
> rate::Float64
> ts::T
> mat_dat::Date
> end
>
> --Tim
>
> On Thursday, December 31, 2015 02:42:11 PM Christopher Alexander wrote:
> > Hello all,
> >
> &
Hello all,
I have a question about the usage of circular references in types. In a
project I am working on, I am running into several situations where this
type of design appears to be the best issue. For example, let's say I have
this (this is a massive simplification but illustrates my
Hello all,
I have a question about the usage of circular references in types. In a
project I am working on, I am running into several situations where this
type of design appears to be the best issue. For example, let's say I have
this (this is a massive simplification but illustrates my
I looked into using BigFloat, but the overhead majorly slowed everything
down. I saw there was a package DoubleDouble that was supposed to do that
level of precision but without the overhead, but it doesn't seem to have
been updated and I couldn't get it to work with 0.4.2. Maybe I could try
oat, the c library function is used. When the
>> exponent is an integer, it uses a llvm function. The implementation for
>> integer exponent used to use an intelligent algorithm that does what your
>> second example does but in a smart way, reducing the number of operations.
>>
t;
> Jeffrey
>
>
> On Thursday, December 17, 2015 at 5:15:33 PM UTC-5, Christopher Alexander
> wrote:
>>
>> I looked into using BigFloat, but the overhead majorly slowed everything
>> down. I saw there was a package DoubleDouble that was supposed to do that
>> lev
Hello all,
I have noted an inaccuracy when using the "^" symbol. Please see below:
*julia> **1.0525004 ^ 6.0*
*1.3593541801778923*
*julia> *
*1.0525004 * 1.0525004 * 1.0525004 *
1.0525004 * 1.0525004 * 1.0525004*
*1.3593541801778926*
Just as a follow up, I just tested with the exponent being an Integer vs a
Float (i.e. 6 vs 6.0), and I now see the same result as I do with Python
and C++ using both.
Chris
On Tuesday, December 15, 2015 at 3:35:35 PM UTC-5, Christopher Alexander
wrote:
>
> Hello all,
>
>
This is great, great stuff. It is awesome to see more Julia in the
finance/econ world.
On Thursday, December 3, 2015 at 9:05:57 AM UTC-5, Spencer Lyon wrote:
>
> The Federal Reserve bank of New York has finished moving their fairly
> large DSGE model from Matlab to Julia. This model is used
I'm not sure if they've tagged their latest version of master, but the
change is in there:
https://github.com/JuliaLang/WinRPM.jl/commit/cb12a4136e9afb2a158ff888bc8ea81d3e72e619
Basically the openSUSE_13.1 needs to be openSUSE_13.2 in the url. I had
this problem like last week and I just
ress.com/2008/06/discretesc.pdf>
>
> More papers here <https://phorgyphynance.wordpress.com/my-papers/>.
>
>
> On Saturday, October 24, 2015 at 7:50:59 AM UTC+8, Christopher Alexander
> wrote:
>>
>> Hello all,
>>
>> I am trying to write a method that build
Hello all,
I am trying to write a method that builds a binomial tree for option
pricing. I am trying to set up my tree like this:
function build_tree(s_opt::StockOption)
u = 1 + s_opt.pu
d = 1 - s_opt.pd
# qu = (exp((s_opt.r - s_opt.div) * s_opt.dt) - d) / (u - d)
# qd = 1 - qu
#
Hello all,
I am trying to write a method that builds a binomial tree for option
pricing. I am trying to set up my tree like this:
function build_tree(s_opt::StockOption)
u = 1 + s_opt.pu
d = 1 - s_opt.pd
# qu = (exp((s_opt.r - s_opt.div) * s_opt.dt) - d) / (u - d)
# qd = 1 - qu
#
Hmm, the site appears to be blocked by my company's web filter.
On Saturday, September 19, 2015 at 8:16:36 PM UTC-4, Jonathan Malmaud wrote:
>
> Hi all,
> There's been some chatter about maybe switching to a new, more modern
> forum platform for Julia that could potentially subsume julia-users,
Hello all,
I am trying to figure out what I'm doing wrong with the creation of a
composite type, as below:
abstract MyType
type MySpecificType <: MyType
type TestTypes
type_test::MyType
end
testing = MySpecificType
x = TestTypes(testing)
After running the above, I get a
where one of the params
was defined to accept a Vector of any AbstractString, and then when I
passed it a Vector of ASCIIStrings, it complained as in my initial message.
Thanks!
Chris
On Friday, October 2, 2015 at 8:11:54 PM UTC-4, Christopher Alexander wrote:
>
> Hello all,
>
>
n/release-0.3/manual/faq/#how-should-i-declare-abstract-container-type-fields
>
> On Fri, Oct 2, 2015 at 6:06 PM, Christopher Alexander <uvap...@gmail.com
> > wrote:
>
>> Hello all,
>>
>> I am trying to figure out what I'm doing wrong with the creation of a
>&
I think the Ito package is a great start, and I've forked it to work on
adding to it other features of Quantlib (as best as I can!). I'm glad
someone mentioned the InterestRates package too as I hadn't seen that. I
work at major bank in risk, and my goal is to at some point sell them on
the
70 matches
Mail list logo